Commit 212077ed authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails

Even in this scenario, the frame still contains references to data that
won't be freed if the frame isn't unreferenced. And the AVFrame itself
will leak, too.

Fixes Coverity issue #1441422.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6a67d518
......@@ -313,7 +313,8 @@ static int activate(AVFilterContext *ctx)
FFMIN(s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
}
}
} else
av_frame_free(&out);
} else if (!out) {
ret = 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