summaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_ciescope.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-03 19:37:18 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-03 21:52:22 +0100
commit3edbc2408b69eda763556de2a1bd129f180d5ed9 (patch)
tree02b55f796c901d1feb2a382873b33219eb4340a8 /libavfilter/vf_ciescope.c
parentc331be21c48a8d273feb0c0131dc524d2c2fc3da (diff)
downloadffmpeg-streaming-3edbc2408b69eda763556de2a1bd129f180d5ed9.zip
ffmpeg-streaming-3edbc2408b69eda763556de2a1bd129f180d5ed9.tar.gz
avfilter/vf_ciescope: Free out AVFrame on error
Fixes memleak Fixes part of CID1197065 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_ciescope.c')
-rw-r--r--libavfilter/vf_ciescope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c
index 450c17b..7c0cfed 100644
--- a/libavfilter/vf_ciescope.c
+++ b/libavfilter/vf_ciescope.c
@@ -1369,8 +1369,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (!s->background) {
ret = draw_background(ctx);
- if (ret < 0)
+ if (ret < 0) {
+ av_frame_free(&out);
return ret;
+ }
s->background = 1;
}
for (y = 0; y < outlink->h; y++) {
OpenPOWER on IntegriCloud