Commit c54aa2fb authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/truemotion2: Fix av_freep arguments

Fixes null pointer dereference
Fixes Ticket2944
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8586d8dd
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment