Skip to content

Commit 51e2a10

Browse files
eendebakptljfp
authored andcommitted
pythongh-145376: Fix refleak in unusual error path in BaseExceptionGroup_new (pythonGH-145474)
1 parent bf76c33 commit 51e2a10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/exceptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ BaseExceptionGroup_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
912912

913913
exceptions = PySequence_Tuple(exceptions);
914914
if (!exceptions) {
915-
return NULL;
915+
goto error;
916916
}
917917

918918
/* We are now holding a ref to the exceptions tuple */

0 commit comments

Comments
 (0)