Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e98147a

Browse files
committed
Fix refcount leak in the UnicodeError constructor:
When parsing the constructor arguments failed, a reference to the argument tuple was leaked.
1 parent 6897355 commit e98147a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/exceptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ UnicodeError__init__(PyObject *self, PyObject *args, PyTypeObject *objecttype)
11911191
&PyInt_Type, &start,
11921192
&PyInt_Type, &end,
11931193
&PyString_Type, &reason))
1194-
return NULL;
1194+
goto finally;
11951195

11961196
if (PyObject_SetAttrString(self, "args", args))
11971197
goto finally;

0 commit comments

Comments
 (0)