]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hlsenc: Fix a memory leak when http_persistent is 1
authorKarthick J <kjeyapal@akamai.com>
Thu, 21 Dec 2017 03:39:24 +0000 (11:39 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Thu, 21 Dec 2017 03:39:24 +0000 (11:39 +0800)
Reviewed-by: Steven Liu <lq@onvideo.cn>
libavformat/hlsenc.c

index 0eebcb44621f5a439a08558bbddfd57f8c17038f..29fc1d4122b63a6ead3a616014d561cfc4477e29 100644 (file)
@@ -1972,6 +1972,8 @@ static int hls_write_trailer(struct AVFormatContext *s)
     av_freep(&vs->baseurl);
     }
 
+    ff_format_io_close(s, &hls->m3u8_out);
+    ff_format_io_close(s, &hls->sub_m3u8_out);
     av_freep(&hls->key_basename);
     av_freep(&hls->var_streams);
     av_freep(&hls->master_m3u8_url);