From 9847380f5f5a3850ecc9f32fa310a7e5e3f703f7 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 2 Oct 2019 10:54:45 +0200 Subject: [PATCH] avfilter/vf_elbg: stop leaking frame on error --- libavfilter/vf_elbg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index 396af82f77..b59da9ec85 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -178,8 +178,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h); uint32_t *pal; - if (!out) + if (!out) { + av_frame_free(&frame); return AVERROR(ENOMEM); + } out->pts = frame->pts; av_frame_free(&frame); pal = (uint32_t *)out->data[1];