avcodec/ylc: do not leak memory at uninit
authorPaul B Mahol <onemda@gmail.com>
Mon, 26 Dec 2016 19:18:00 +0000 (20:18 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 26 Dec 2016 19:18:00 +0000 (20:18 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/ylc.c

index 95a5e05..81a5774 100644 (file)
@@ -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;
 }