PR #24473 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24473 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24473.patch
Fixes: invalid free on allocation failure Fixes: BvbItG8H5bk7 Found-by: zhang xingxing >From 913874c1bbecc08cfb78d9db11ba9cc5d410562d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Mon, 14 Sep 2026 02:01:14 +0200 Subject: [PATCH] avfilter/vf_colorconstancy: free only allocated buffers on setup failure Fixes: invalid free on allocation failure Fixes: BvbItG8H5bk7 Found-by: zhang xingxing --- libavfilter/vf_colorconstancy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c index a00de84de8..29a525e872 100644 --- a/libavfilter/vf_colorconstancy.c +++ b/libavfilter/vf_colorconstancy.c @@ -221,7 +221,7 @@ static int setup_derivative_buffers(AVFilterContext* ctx, ThreadData *td) td->data[b][p] = av_calloc(s->planeheight[p] * s->planewidth[p], sizeof(*td->data[b][p])); if (!td->data[b][p]) { - cleanup_derivative_buffers(td, b + 1, p); + cleanup_derivative_buffers(td, b, p); return AVERROR(ENOMEM); } } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
