summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-08-14 21:00:28 +0000
committerWalter Dörwald <walter@livinglogic.de>2003-08-14 21:00:28 +0000
commit07089028f17ae53138f8bc4479783ba8488d7f94 (patch)
tree14d9d3887bd4ef7e70c41b9f7bc793238d5f2344
parent9ee6975fb6faf484bc8b35adbb671b3a22910729 (diff)
downloadcpython-git-07089028f17ae53138f8bc4479783ba8488d7f94.tar.gz
Backport checkin:
Fix refcount leak in the UnicodeError constructor: When parsing the constructor arguments failed, a reference to the argument tuple was leaked.
-rw-r--r--Python/exceptions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c
index da78f2b19d..d489aa6efb 100644
--- a/Python/exceptions.c
+++ b/Python/exceptions.c
@@ -1191,7 +1191,7 @@ UnicodeError__init__(PyObject *self, PyObject *args, PyTypeObject *objecttype)
&PyInt_Type, &start,
&PyInt_Type, &end,
&PyString_Type, &reason))
- return NULL;
+ goto finally;
if (PyObject_SetAttrString(self, "args", args))
goto finally;