avcodec/ivi: Free custom blk_vlc
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 5 May 2017 22:08:38 +0000 (00:08 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 5 May 2017 22:33:19 +0000 (00:33 +0200)
Fixes memleak
Fixes: 1351/clusterfuzz-testcase-minimized-5861971645693952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/ivi.c

index c02addf..866f066 100644 (file)
@@ -1206,6 +1206,9 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
     if (ctx->mb_vlc.cust_tab.table)
         ff_free_vlc(&ctx->mb_vlc.cust_tab);
 
+    if (ctx->blk_vlc.cust_tab.table)
+        ff_free_vlc(&ctx->blk_vlc.cust_tab);
+
     av_frame_free(&ctx->p_frame);
 
     return 0;