From c54aa2fb0f869ec025933944cbd1634fffe95d09 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Sep 2013 20:27:54 +0200 Subject: avcodec/truemotion2: Fix av_freep arguments Fixes null pointer dereference Fixes Ticket2944 Signed-off-by: Michael Niedermayer --- libavcodec/truemotion2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libavcodec/truemotion2.c') diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index e083171668..a7dbabe6ac 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -957,14 +957,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); av_frame_free(&l->pic); return AVERROR(ENOMEM); } -- cgit v1.2.3