avfilter/vf_unsharp: Free out AVFrame on error
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 3 Feb 2017 18:37:18 +0000 (19:37 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 3 Feb 2017 20:52:22 +0000 (21:52 +0100)
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_unsharp.c

index 7c600c9..438ff6d 100644 (file)
@@ -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);
 }