From 150523efa5fc1a53d64f068cd2e4444fa3ce40a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Fri, 15 Aug 2003 16:52:19 +0000 Subject: 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 c56ef9f..163976e 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; } } -- cgit v0.12