[FFmpeg-cvslog] avformat/hlsenc.c: fix memory leak in fmp4 mode.

Charles Liu git at videolan.org
Tue Oct 30 05:13:49 EET 2018


ffmpeg | branch: master | Charles Liu <liuchh83 at gmail.com> | Tue Oct 30 11:08:29 2018 +0800| [e9dbd62cb5f167c99298467db54d56c61a6be74f] | committer: Steven Liu

avformat/hlsenc.c: fix memory leak in fmp4 mode.

Signed-off-by: Charles Liu <liuchh83 at gmail.com>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

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

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

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 3ccd8756f6..c322b5a48f 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2205,6 +2205,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
                 avio_flush(oc->pb);
                 range_length = avio_close_dyn_buf(oc->pb, &buffer);
                 avio_write(vs->out, buffer, range_length);
+                av_free(buffer);
                 vs->init_range_length = range_length;
                 avio_open_dyn_buf(&oc->pb);
                 vs->packets_written = 0;



More information about the ffmpeg-cvslog mailing list