[FFmpeg-cvslog] avfilter/vf_stack: Fix memleak of out frame

Michael Niedermayer git at videolan.org
Sat Sep 5 15:22:48 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep  5 14:41:45 2015 +0200| [7eab904d11dedfdcdf4d22ed1116cc148ca40b59] | committer: Michael Niedermayer

avfilter/vf_stack: Fix memleak of out frame

Fixes CID1322347

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7eab904d11dedfdcdf4d22ed1116cc148ca40b59
---

 libavfilter/vf_stack.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index 6342e3f..8a90caa 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -116,8 +116,10 @@ static int process_frame(FFFrameSync *fs)
         int linesize[4];
         int height[4];
 
-        if ((ret = av_image_fill_linesizes(linesize, inlink->format, inlink->w)) < 0)
+        if ((ret = av_image_fill_linesizes(linesize, inlink->format, inlink->w)) < 0) {
+            av_frame_free(&out);
             return ret;
+        }
 
         height[1] = height[2] = FF_CEIL_RSHIFT(inlink->h, s->desc->log2_chroma_h);
         height[0] = height[3] = inlink->h;



More information about the ffmpeg-cvslog mailing list