diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-11 22:50:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-11 22:51:33 +0200 |
commit | e24e5986a6f5bd9dc2e65306d7969d3ea7dab7a5 (patch) | |
tree | e9b5a5e387c579ae9570f69e461d5d8e40cefd72 /libavcodec/dct.c | |
parent | 3521c70dabb2be64e777eb06ef1f81e6e8cf51e4 (diff) | |
download | ffmpeg-e24e5986a6f5bd9dc2e65306d7969d3ea7dab7a5.tar.gz |
avcodec/dct: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dct.c')
-rw-r--r-- | libavcodec/dct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dct.c b/libavcodec/dct.c index 26b485106d..9cabc4f591 100644 --- a/libavcodec/dct.c +++ b/libavcodec/dct.c @@ -193,7 +193,7 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse) s->csc2 = av_malloc_array(n / 2, sizeof(FFTSample)); if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) { - av_free(s->csc2); + av_freep(&s->csc2); return -1; } @@ -218,5 +218,5 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse) av_cold void ff_dct_end(DCTContext *s) { ff_rdft_end(&s->rdft); - av_free(s->csc2); + av_freep(&s->csc2); } |