avcodec/eatgv: use av_freep(), do not leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Oct 2014 10:22:00 +0000 (12:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Oct 2014 10:22:28 +0000 (12:22 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/eatgv.c

index f204a13..b84af80 100644 (file)
@@ -349,8 +349,8 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx)
     TgvContext *s = avctx->priv_data;
     av_frame_free(&s->last_frame);
     av_freep(&s->frame_buffer);
-    av_free(s->mv_codebook);
-    av_free(s->block_codebook);
+    av_freep(&s->mv_codebook);
+    av_freep(&s->block_codebook);
     return 0;
 }