diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-19 13:42:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-19 13:44:30 +0100 |
commit | beec818d99e5951cd308ac64370639ad38ad9865 (patch) | |
tree | 4b3afb28ebb9fb09f4dc2c0b73cc670803549fbf | |
parent | 61fc1cbfbd82ebd4edf6866331280b3dfb06e7b1 (diff) | |
download | ffmpeg-beec818d99e5951cd308ac64370639ad38ad9865.tar.gz |
avcodec/truemotion2: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/truemotion2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 18d7c1e685..d2aa3c6f45 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -996,14 +996,14 @@ static av_cold int decode_end(AVCodecContext *avctx) av_free(l->last); av_free(l->clast); for (i = 0; i < TM2_NUM_STREAMS; i++) - av_free(l->tokens[i]); + av_freep(&l->tokens[i]); if (l->Y1) { - av_free(l->Y1_base); - av_free(l->U1_base); - av_free(l->V1_base); - av_free(l->Y2_base); - av_free(l->U2_base); - av_free(l->V2_base); + av_freep(&l->Y1_base); + av_freep(&l->U1_base); + av_freep(&l->V1_base); + av_freep(&l->Y2_base); + av_freep(&l->U2_base); + av_freep(&l->V2_base); } av_freep(&l->buffer); l->buffer_size = 0; |