https://github.com/python/cpython/commit/18aec59fe5bbae9225951ca4d69bfca17eba82d8
commit: 18aec59fe5bbae9225951ca4d69bfca17eba82d8
branch: main
author: Pieter Eendebak <[email protected]>
committer: encukou <[email protected]>
date: 2026-03-04T14:34:24+01:00
summary:
gh-145376: Fix refleak in unusual error path in BaseExceptionGroup_new
(GH-145474)
files:
M Objects/exceptions.c
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 499fb2b34b34a8..f5edc286243ee1 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 */
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]