summaryrefslogtreecommitdiff
path: root/libavfilter/vf_stack.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-05 14:41:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-05 14:41:45 +0200
commit7eab904d11dedfdcdf4d22ed1116cc148ca40b59 (patch)
tree651507652319523b774cfd7de15264bafbc8dfa7 /libavfilter/vf_stack.c
parent4eca1939ef0614d0959fffb93f93d44af6740e8c (diff)
avfilter/vf_stack: Fix memleak of out frame
Fixes CID1322347 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_stack.c')
-rw-r--r--libavfilter/vf_stack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index 6342e3fbc5..8a90caada7 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;