[FFmpeg-cvslog] avcodec/twinvq: Use av_freep() to avoid leaving stale pointers in memory

Michael Niedermayer git at videolan.org
Wed Nov 19 13:49:47 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 19 13:42:46 2014 +0100| [4ffec6d9331527f0d4bf265211e10f3298aaa977] | committer: Michael Niedermayer

avcodec/twinvq: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ffec6d9331527f0d4bf265211e10f3298aaa977
---

 libavcodec/twinvq.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index f117220..b37fdee 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -755,13 +755,13 @@ av_cold int ff_twinvq_decode_close(AVCodecContext *avctx)
 
     for (i = 0; i < 3; i++) {
         ff_mdct_end(&tctx->mdct_ctx[i]);
-        av_free(tctx->cos_tabs[i]);
+        av_freep(&tctx->cos_tabs[i]);
     }
 
-    av_free(tctx->curr_frame);
-    av_free(tctx->spectrum);
-    av_free(tctx->prev_frame);
-    av_free(tctx->tmp_buf);
+    av_freep(&tctx->curr_frame);
+    av_freep(&tctx->spectrum);
+    av_freep(&tctx->prev_frame);
+    av_freep(&tctx->tmp_buf);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list