diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c index d590cfa48d..92495097cc 100644 --- a/libavfilter/vf_perspective.c +++ b/libavfilter/vf_perspective.c @@ -463,6 +463,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) if (s->eval_mode == EVAL_MODE_FRAME) { if ((ret = calc_persp_luts(ctx, inlink)) < 0) { + av_frame_free(&out); return ret; } }