[FFmpeg-cvslog] libavformat/hlsenc: fix a memory leak on error path

LuMingYin git at videolan.org
Mon May 20 19:13:34 EEST 2024


ffmpeg | branch: master | LuMingYin <lumingyindetect at 163.com> | Sat Apr 13 14:35:29 2024 +0800| [9481b7d932e895b903c260c54c7b26adfe402e1f] | committer: Zhao Zhili

libavformat/hlsenc: fix a memory leak on error path

Signed-off-by: LuMingYin <lumingyindetect at 163.com>
Reviewed-by: Steven Liu <lq at chinaffmpeg.org>
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9481b7d932e895b903c260c54c7b26adfe402e1f
---

 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index bde7230036..0e2843c6bc 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2757,6 +2757,7 @@ static int hls_write_trailer(struct AVFormatContext *s)
             filename = av_asprintf("%s", oc->url);
         }
         if (!filename) {
+            av_dict_free(&options);
             av_freep(&old_filename);
             return AVERROR(ENOMEM);
         }



More information about the ffmpeg-cvslog mailing list