avcodec/atrac3plusdec: use av_freep(), do not leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Oct 2014 14:09:05 +0000 (16:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Oct 2014 14:09:23 +0000 (16:09 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/atrac3plusdec.c

index 3a6b3cf..3699580 100644 (file)
@@ -67,7 +67,7 @@ typedef struct ATRAC3PContext {
 
 static av_cold int atrac3p_decode_close(AVCodecContext *avctx)
 {
-    av_free(((ATRAC3PContext *)(avctx->priv_data))->ch_units);
+    av_freep(&((ATRAC3PContext *)(avctx->priv_data))->ch_units);
 
     return 0;
 }