[FFmpeg-cvslog] avcodec/ylc: do not leak memory at uninit

Paul B Mahol git at videolan.org
Mon Dec 26 21:44:27 EET 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Dec 26 20:18:00 2016 +0100| [341d3ee441474167ac784bb39f2c31f211451707] | committer: Paul B Mahol

avcodec/ylc: do not leak memory at uninit

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavcodec/ylc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/ylc.c b/libavcodec/ylc.c
index 95a5e05..81a5774 100644
--- a/libavcodec/ylc.c
+++ b/libavcodec/ylc.c
@@ -455,6 +455,10 @@ static av_cold int decode_end(AVCodecContext *avctx)
     ff_free_vlc(&s->vlc[1]);
     ff_free_vlc(&s->vlc[2]);
     ff_free_vlc(&s->vlc[3]);
+    av_freep(&s->table_bits);
+    s->table_bits_size = 0;
+    av_freep(&s->bitstream_bits);
+    s->bitstream_bits_size = 0;
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list