summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2019-08-19 21:01:07 +0800
committerSteven Liu <lq@chinaffmpeg.org>2019-08-20 08:44:42 +0800
commitf36925201c591015b1fbd366df71317f0290cef2 (patch)
tree803341dc0b7da9de5a06497ef28e4112389053e1 /libavformat/hlsenc.c
parenteccb94c3babcc93484d409b1d0fa059f1a2b7645 (diff)
downloadffmpeg-f36925201c591015b1fbd366df71317f0290cef2.tar.gz
lavf/hlsenc: free the old_filname to avoid memory leak
free the old_filname to avoid memory leak in error handle path. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 149b2a3bd0..01c24b3458 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -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 (hls->pl_type != PLAYLIST_TYPE_VOD) {
if ((ret = hls_window(s, 0, vs)) < 0) {
+ av_free(old_filename);
return ret;
}
}