avformat/hlsenc: fix memleak in hls_write_trailer
authorSteven Liu <lq@chinaffmpeg.org>
Wed, 21 Aug 2019 02:24:12 +0000 (10:24 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 26 Aug 2019 03:06:24 +0000 (11:06 +0800)
fix CID: 1426931

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavformat/hlsenc.c

index 18173cd..3c873e5 100644 (file)
@@ -2538,6 +2538,7 @@ static int hls_write_trailer(struct AVFormatContext *s)
             filename = av_asprintf("%s", vs->avf->url);
         }
         if (!filename) {
+            av_free(old_filename);
             return AVERROR(ENOMEM);
         }