avcodec/flac_parser: use av_freep(), do not leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Oct 2014 16:30:15 +0000 (18:30 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Oct 2014 16:30:31 +0000 (18:30 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/flashsvenc.c

index 7ad15f1..a6d7caa 100644 (file)
@@ -94,9 +94,9 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx)
 
     deflateEnd(&s->zstream);
 
-    av_free(s->encbuffer);
-    av_free(s->previous_frame);
-    av_free(s->tmpblock);
+    av_freep(&s->encbuffer);
+    av_freep(&s->previous_frame);
+    av_freep(&s->tmpblock);
 
     av_frame_free(&avctx->coded_frame);