1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-10-30 23:36:51 +01:00
parent a1cb8779e2
commit 2a26b22a17

View File

@ -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;
}