summaryrefslogtreecommitdiff
path: root/libavcodec/twinvq.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-19 13:42:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-19 13:44:40 +0100
commit4ffec6d9331527f0d4bf265211e10f3298aaa977 (patch)
tree75720895544fbba0788088555e396ed5852ad43b /libavcodec/twinvq.c
parentb9792afad1c619f46f63ad4d977d6a2224bf4874 (diff)
downloadffmpeg-4ffec6d9331527f0d4bf265211e10f3298aaa977.tar.gz
avcodec/twinvq: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/twinvq.c')
-rw-r--r--libavcodec/twinvq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index f11722026c..b37fdee59f 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;
}