summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-08-14 20:59:07 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-08-14 20:59:07 (GMT)
commite98147a8e553a7b653cd2154403f914c1589857e (patch)
treef0e0babb910a8947a3876808c808cc8bb7ff7bc0
parent689735562d45a2c384fbe48069098a4459111fea (diff)
downloadcpython-e98147a8e553a7b653cd2154403f914c1589857e.zip
cpython-e98147a8e553a7b653cd2154403f914c1589857e.tar.gz
cpython-e98147a8e553a7b653cd2154403f914c1589857e.tar.bz2
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 da78f2b..d489aa6 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;