avfilter/vf_premultiply: fix memory-leak on failure

Fixes CID #1416352
This commit is contained in:
Timo Rothenpieler 2017-11-08 19:17:51 +01:00
parent 284b432662
commit c7ded42d5d

View File

@ -607,9 +607,10 @@ static int activate(AVFilterContext *ctx)
int64_t pts;
if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) {
if ((ret = filter_frame(ctx, &out, frame, frame)) < 0)
return ret;
ret = filter_frame(ctx, &out, frame, frame);
av_frame_free(&frame);
if (ret < 0)
return ret;
ret = ff_filter_frame(ctx->outputs[0], out);
}
if (ret < 0) {