Commit f3692520 authored by Jun Zhao's avatar Jun Zhao Committed by Steven Liu

lavf/hlsenc: free the old_filname to avoid memory leak

free the old_filname to avoid memory leak in error handle
path.
Reviewed-by: 's avatarSteven Liu <lq@onvideo.cn>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent eccb94c3
...@@ -2428,6 +2428,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -2428,6 +2428,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
// if we're building a VOD playlist, skip writing the manifest multiple times, and just wait until the end // if we're building a VOD playlist, skip writing the manifest multiple times, and just wait until the end
if (hls->pl_type != PLAYLIST_TYPE_VOD) { if (hls->pl_type != PLAYLIST_TYPE_VOD) {
if ((ret = hls_window(s, 0, vs)) < 0) { if ((ret = hls_window(s, 0, vs)) < 0) {
av_free(old_filename);
return ret; return ret;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment