ffmpeg | branch: master | Steven Liu <l...@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 <liuq...@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;
                 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to