From 18aec59fe5bbae9225951ca4d69bfca17eba82d8 Mon Sep 17 00:00:00 2001 From: Pieter Eendebak Date: Wed, 4 Mar 2026 14:34:24 +0100 Subject: [PATCH] gh-145376: Fix refleak in unusual error path in BaseExceptionGroup_new (GH-145474) --- Objects/exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 499fb2b34b34..f5edc286243e 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -912,7 +912,7 @@ BaseExceptionGroup_new(PyTypeObject *type, PyObject *args, PyObject *kwds) exceptions = PySequence_Tuple(exceptions); if (!exceptions) { - return NULL; + goto error; } /* We are now holding a ref to the exceptions tuple */ -- 2.47.3