aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-11-08 19:17:51 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2017-11-13 20:33:10 +0100
commitc7ded42d5dfc0124008b5b9b13a1a342324885ed (patch)
tree069b4c57eac0ac486962d77e3bf6e75432054c0a
parent284b432662b6e137148ff9d13ef2b554cb14b4ae (diff)
downloadffmpeg-c7ded42d5dfc0124008b5b9b13a1a342324885ed.tar.gz
avfilter/vf_premultiply: fix memory-leak on failure
Fixes CID #1416352
-rw-r--r--libavfilter/vf_premultiply.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c
index 5120adc476..df4f26578d 100644
--- a/libavfilter/vf_premultiply.c
+++ b/libavfilter/vf_premultiply.c
@@ -607,9 +607,10 @@ static int activate(AVFilterContext *ctx)
int64_t pts;
if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) {
- if ((ret = filter_frame(ctx, &out, frame, frame)) < 0)
- return ret;
+ ret = filter_frame(ctx, &out, frame, frame);
av_frame_free(&frame);
+ if (ret < 0)
+ return ret;
ret = ff_filter_frame(ctx->outputs[0], out);
}
if (ret < 0) {