From: Walter Dörwald Date: Fri, 15 Aug 2003 16:52:19 +0000 (+0000) Subject: Fix refcounting leak in charmaptranslate_lookup() X-Git-Tag: v2.4a1~1733 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=150523efa5fc1a53d64f068cd2e4444fa3ce40a3;p=python Fix refcounting leak in charmaptranslate_lookup() --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c56ef9fa27..163976e952 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; } }