summaryrefslogtreecommitdiff
path: root/libavcodec/cngdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-30 23:36:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-30 23:36:51 +0100
commit2a26b22a173969f95abb0b65016438347b6c9bcd (patch)
treedda1bb92771df286df967c260e59c32fc3743f86 /libavcodec/cngdec.c
parenta1cb8779e2c7a817b44332fd28a0da4ed6011b97 (diff)
avcodec/cngdec: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cngdec.c')
-rw-r--r--libavcodec/cngdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index 855baaaa8d..c49e903ce8 100644
--- a/libavcodec/cngdec.c
+++ b/libavcodec/cngdec.c
@@ -41,11 +41,11 @@ typedef struct CNGContext {
static av_cold int cng_decode_close(AVCodecContext *avctx)
{
CNGContext *p = avctx->priv_data;
- av_free(p->refl_coef);
- av_free(p->target_refl_coef);
- av_free(p->lpc_coef);
- av_free(p->filter_out);
- av_free(p->excitation);
+ av_freep(&p->refl_coef);
+ av_freep(&p->target_refl_coef);
+ av_freep(&p->lpc_coef);
+ av_freep(&p->filter_out);
+ av_freep(&p->excitation);
return 0;
}