1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

libavformat/hlsenc: fix a memory leak on error path

Signed-off-by: LuMingYin <lumingyindetect@163.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
LuMingYin 2024-04-13 14:35:29 +08:00 committed by Zhao Zhili
parent b113050d96
commit 9481b7d932

View File

@ -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);
}