diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-08 20:27:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-03 01:04:19 +0200 |
commit | c3ee5b4c36411532fc8a26ef533ec89628b29cb5 (patch) | |
tree | de768409558917920151cbcfa038d258c61805ca | |
parent | c17fd9f9ce2eb2e4bd11045faa4d6ae8b1fe8e1c (diff) | |
download | ffmpeg-c3ee5b4c36411532fc8a26ef533ec89628b29cb5.tar.gz |
avcodec/truemotion2: Fix av_freep arguments
Fixes null pointer dereference
Fixes Ticket2944
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c54aa2fb0f869ec025933944cbd1634fffe95d09)
Conflicts:
libavcodec/truemotion2.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/truemotion2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index eacd728ca4..18b38f838c 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -948,14 +948,14 @@ static av_cold int decode_init(AVCodecContext *avctx) if (!l->Y1_base || !l->Y2_base || !l->U1_base || !l->V1_base || !l->U2_base || !l->V2_base || !l->last || !l->clast) { - av_freep(l->Y1_base); - av_freep(l->Y2_base); - av_freep(l->U1_base); - av_freep(l->U2_base); - av_freep(l->V1_base); - av_freep(l->V2_base); - av_freep(l->last); - av_freep(l->clast); + av_freep(&l->Y1_base); + av_freep(&l->Y2_base); + av_freep(&l->U1_base); + av_freep(&l->U2_base); + av_freep(&l->V1_base); + av_freep(&l->V2_base); + av_freep(&l->last); + av_freep(&l->clast); return AVERROR(ENOMEM); } l->Y1 = l->Y1_base + l->y_stride * 4 + 4; |