avcodec/atrac3: use av_freep(), do not leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 10 Oct 2014 15:09:46 +0000 (17:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 10 Oct 2014 15:10:02 +0000 (17:10 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/atrac3.c

index d1dfa6b..d9f1348 100644 (file)
@@ -190,8 +190,8 @@ static av_cold int atrac3_decode_close(AVCodecContext *avctx)
 {
     ATRAC3Context *q = avctx->priv_data;
 
-    av_free(q->units);
-    av_free(q->decoded_bytes_buffer);
+    av_freep(&q->units);
+    av_freep(&q->decoded_bytes_buffer);
 
     ff_mdct_end(&q->mdct_ctx);