[FFmpeg-devel] [PATCH] avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Sun Feb 9 20:40:34 EET 2020
Even in this scenario, the frame still contains references to data that
won't be freed if the frame isn't unreferenced. And the AVFrame itself
will leak, too.
Fixes Coverity issue #1441422.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavfilter/vf_dedot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_dedot.c b/libavfilter/vf_dedot.c
index 1fb7bfe866..993ac8f74f 100644
--- a/libavfilter/vf_dedot.c
+++ b/libavfilter/vf_dedot.c
@@ -313,7 +313,8 @@ static int activate(AVFilterContext *ctx)
FFMIN(s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
}
- }
+ } else
+ av_frame_free(&out);
} else if (!out) {
ret = AVERROR(ENOMEM);
}
--
2.20.1
More information about the ffmpeg-devel
mailing list