[FFmpeg-cvslog] lavf/hlsenc: fix memory leak

Jun Zhao git at videolan.org
Fri Oct 18 05:00:59 EEST 2019


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Sat Oct 12 00:47:25 2019 +0800| [feaec3bc3133ff143b8445c919f2c4c56048fdf9] | committer: Jun Zhao

lavf/hlsenc: fix memory leak

fix memory leak

Reviewed-by: Steven Liu <lq at chinaffmpeg.org>
Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

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

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

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index cd4320114d..5a27b0f657 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -585,6 +585,8 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls,
             av_strlcpy(sub_path, vtt_dirname, sub_path_size);
             av_strlcat(sub_path, segment->sub_filename, sub_path_size);
 
+            av_freep(&vtt_dirname);
+
             if (hls->method || (proto && !av_strcasecmp(proto, "http"))) {
                 av_dict_set(&options, "method", "DELETE", 0);
                 if ((ret = vs->vtt_avf->io_open(vs->vtt_avf, &out, sub_path, AVIO_FLAG_WRITE, &options)) < 0) {



More information about the ffmpeg-cvslog mailing list