X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ftruemotion1.c;h=c2022fb8d8e8e58d91887177ae6cef8cdc415a6e;hb=e248522d1b0d6dd8641f382cd5c4338d0ecd98e5;hp=da843c444009da751e00f3cfa025cd1aa4026856;hpb=90b72f6bdac98bbdd4bfddbfdc6038c667d7d30e;p=ffmpeg diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index da843c44400..c2022fb8d8e 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -489,8 +489,10 @@ static av_cold int truemotion1_decode_init(AVCodecContext *avctx) /* there is a vertical predictor for each pixel in a line; each vertical * predictor is 0 to start with */ av_fast_malloc(&s->vert_pred, &s->vert_pred_size, s->avctx->width * sizeof(unsigned int)); - if (!s->vert_pred) + if (!s->vert_pred) { + av_frame_free(&s->frame); return AVERROR(ENOMEM); + } return 0; }