[FFmpeg-cvslog] avfilter/vf_unsharp: Free out AVFrame on error
Michael Niedermayer
git at videolan.org
Fri Feb 3 23:06:15 EET 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb 3 19:37:18 2017 +0100| [c347b286995a98247e1e9f7a1743a69f83cbbe1a] | committer: Michael Niedermayer
avfilter/vf_unsharp: Free out AVFrame on error
Fixes memleak
Fixes part of CID1197065
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c347b286995a98247e1e9f7a1743a69f83cbbe1a
---
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 7c600c9..438ff6d 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);
}
More information about the ffmpeg-cvslog
mailing list