PR #22877 opened by Marvin Scholz (ePirat)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22877
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22877.patch

Fixes Coverity issue #1691725


>From 98eddb367699e3ace47216197c46d10083269530 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <[email protected]>
Date: Tue, 21 Apr 2026 21:55:36 +0200
Subject: [PATCH] swscale: ops_dispatch: fix leak on error

Fixes Coverity issue #1691725
---
 libswscale/ops_dispatch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libswscale/ops_dispatch.c b/libswscale/ops_dispatch.c
index 62cc2bb202..3f24c9cbb3 100644
--- a/libswscale/ops_dispatch.c
+++ b/libswscale/ops_dispatch.c
@@ -547,6 +547,7 @@ static int compile(SwsGraph *graph, const SwsOpList *ops, 
SwsPass *input,
             int64_t bits = (int64_t) filter->offsets[x] * p->pixel_bits_in;
             if ((bits & 0x7) || (bits >> 3) > INT32_MAX) {
                 ret = AVERROR(EINVAL);
+                av_freep(&offset);
                 goto fail;
             }
             offset[x] = bits >> 3;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to