[FFmpeg-cvslog] avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails
Andreas Rheinhardt
git at videolan.org
Wed May 20 12:15:57 EEST 2020
ffmpeg | branch: release/4.2 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Sun Feb 9 19:40:34 2020 +0100| [15ccdea8b381e4e120fd5a98b98b6fde5371097f] | committer: Andreas Rheinhardt
avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails
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>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 212077eda46c4c3eb644774d2b1ccbeb3e322fff)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15ccdea8b381e4e120fd5a98b98b6fde5371097f
---
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 bb0f9e5ac8..ff2e0e3a79 100644
--- a/libavfilter/vf_dedot.c
+++ b/libavfilter/vf_dedot.c
@@ -312,7 +312,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);
}
More information about the ffmpeg-cvslog
mailing list