From: Walter Dörwald Date: Thu, 14 Aug 2003 20:59:07 +0000 (+0000) Subject: Fix refcount leak in the UnicodeError constructor: X-Git-Tag: v2.4a1~1741 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e98147a8e553a7b653cd2154403f914c1589857e;p=python Fix refcount leak in the UnicodeError constructor: When parsing the constructor arguments failed, a reference to the argument tuple was leaked. --- 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;