From c347b286995a98247e1e9f7a1743a69f83cbbe1a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Feb 2017 19:37:18 +0100 Subject: [PATCH] avfilter/vf_unsharp: Free out AVFrame on error Fixes memleak Fixes part of CID1197065 Signed-off-by: Michael Niedermayer --- libavfilter/vf_unsharp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 7c600c91c1..438ff6d8fb 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -258,8 +258,10 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) end: av_frame_free(&in); - if (ret < 0) + if (ret < 0) { + av_frame_free(&out); return ret; + } return ff_filter_frame(outlink, out); }