[FFmpeg-cvslog] avformat/hlsenc: fix filename memleak in hls_write_packet
Steven Liu
git at videolan.org
Tue May 12 17:33:45 EEST 2020
ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Tue May 12 18:02:26 2020 +0800| [76eaca43be161377a370228b1debb2617c8d379b] | committer: Steven Liu
avformat/hlsenc: fix filename memleak in hls_write_packet
Signed-off-by: Steven Liu <liuqi05 at kuaishou.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=76eaca43be161377a370228b1debb2617c8d379b
---
libavformat/hlsenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 74cc220cd9..0abf5402a8 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2442,6 +2442,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0) {
av_log(s, hls->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR,
"Failed to open file '%s'\n", filename);
+ av_freep(&filename);
av_dict_free(&options);
return hls->ignore_io_errors ? 0 : ret;
}
@@ -2450,6 +2451,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
}
ret = flush_dynbuf(vs, &range_length);
if (ret < 0) {
+ av_freep(&filename);
av_dict_free(&options);
return ret;
}
More information about the ffmpeg-cvslog
mailing list