From: Walter Dörwald Date: Fri, 15 Aug 2003 15:00:26 +0000 (+0000) Subject: Fix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()). X-Git-Tag: v2.4a1~1735 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4ade0885c9a1bf7013b555c93060e0126bfa7eb;p=python Fix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()). --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 6044a56111..694c174022 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1834,6 +1834,8 @@ PyObject *PyUnicode_DecodeUnicodeEscape(const char *s, } if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v)))) goto onError; + Py_XDECREF(errorHandler); + Py_XDECREF(exc); return (PyObject *)v; ucnhashError: