Skip to content

Commit 45f4648

Browse files
committed
Fix refleak in unusual error path in BaseExceptionGroup_new
1 parent 671a953 commit 45f4648

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)