avcodec/vp6: Use av_freep(), avoid leaving stale pointers
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Nov 2014 17:02:01 +0000 (18:02 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Nov 2014 17:03:27 +0000 (18:03 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vp6.c

index a18b8ff..e97ef76 100644 (file)
@@ -651,7 +651,7 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx)
     if (s->alpha_context) {
         ff_vp56_free_context(s->alpha_context);
         vp6_decode_free_context(s->alpha_context);
-        av_free(s->alpha_context);
+        av_freep(&s->alpha_context);
     }
 
     return 0;