From 4c1392a368158eb75ed511163f5de35bdd265375 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Walter=20D=C3=B6rwald?= Date: Fri, 15 Aug 2003 16:52:33 +0000 Subject: [PATCH] Backport checkin: Fix refcounting leak in charmaptranslate_lookup() --- Objects/unicodeobject.c | 1 + 1 file changed, 1 insertion(+) 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; } } -- 2.47.3