diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-14 01:56:44 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-18 02:51:18 +0200 |
commit | 29c5c8fdfb4f7c3fe22260d73e9ade7e54330a7d (patch) | |
tree | ecacaa59ea878940ed8570ec82151b24e1e7c6ef /libavcodec/cngenc.c | |
parent | 0b7474a5910e6f80cb98857f0d131b13eb2aa2e0 (diff) | |
download | ffmpeg-29c5c8fdfb4f7c3fe22260d73e9ade7e54330a7d.tar.gz |
avcodec/cngenc: Replace av_free() by av_freep() in close function
This avoids leaving pointers to already freed memory in memory.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/cngenc.c')
-rw-r--r-- | libavcodec/cngenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c index e185c4a40a..8f23b7555a 100644 --- a/libavcodec/cngenc.c +++ b/libavcodec/cngenc.c @@ -37,8 +37,8 @@ static av_cold int cng_encode_close(AVCodecContext *avctx) { CNGContext *p = avctx->priv_data; ff_lpc_end(&p->lpc); - av_free(p->samples32); - av_free(p->ref_coef); + av_freep(&p->samples32); + av_freep(&p->ref_coef); return 0; } |