summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-08-15 16:52:19 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-08-15 16:52:19 (GMT)
commit150523efa5fc1a53d64f068cd2e4444fa3ce40a3 (patch)
tree112c9eefe889f991a270a8e61f39fc07ba48bf10 /Objects/unicodeobject.c
parent9b30f206ee6bbef7f591f1dda9ecd9a20c7ef7a5 (diff)
downloadcpython-150523efa5fc1a53d64f068cd2e4444fa3ce40a3.zip
cpython-150523efa5fc1a53d64f068cd2e4444fa3ce40a3.tar.gz
cpython-150523efa5fc1a53d64f068cd2e4444fa3ce40a3.tar.bz2
Fix refcounting leak in charmaptranslate_lookup()
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}