From: Walter Dörwald Date: Fri, 15 Aug 2003 16:52:33 +0000 (+0000) Subject: Backport checkin: X-Git-Tag: v2.3.1~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c1392a368158eb75ed511163f5de35bdd265375;p=thirdparty%2FPython%2Fcpython.git Backport checkin: Fix refcounting leak in charmaptranslate_lookup() --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c56ef9fa27f7..163976e952b7 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3202,6 +3202,7 @@ int charmaptranslate_lookup(Py_UNICODE c, PyObject *mapping, PyObject **result) /* wrong return value */ PyErr_SetString(PyExc_TypeError, "character mapping must return integer, None or unicode"); + Py_DECREF(x); return -1; } }