[FFmpeg-devel] [PATCH v1 1/3] avformat/hlsenc: fix memleak in hls_write_trailer

Steven Liu lq at chinaffmpeg.org
Wed Aug 21 05:24:12 EEST 2019


fix CID: 1426931

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 836e290eea..fbc6554b97 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2539,6 +2539,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);
         }
 
-- 
2.15.1





More information about the ffmpeg-devel mailing list