From 76eaca43be161377a370228b1debb2617c8d379b Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Tue, 12 May 2020 18:02:26 +0800 Subject: avformat/hlsenc: fix filename memleak in hls_write_packet Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/hlsenc.c') 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; } -- cgit v1.2.1