From 3edbc2408b69eda763556de2a1bd129f180d5ed9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Feb 2017 19:37:18 +0100 Subject: avfilter/vf_ciescope: Free out AVFrame on error Fixes memleak Fixes part of CID1197065 Signed-off-by: Michael Niedermayer --- libavfilter/vf_ciescope.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavfilter/vf_ciescope.c') diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c index 450c17b..7c0cfed 100644 --- a/libavfilter/vf_ciescope.c +++ b/libavfilter/vf_ciescope.c @@ -1369,8 +1369,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (!s->background) { ret = draw_background(ctx); - if (ret < 0) + if (ret < 0) { + av_frame_free(&out); return ret; + } s->background = 1; } for (y = 0; y < outlink->h; y++) { -- cgit v1.1