diff Objects/unicodeobject.c @ 30164:7cb4ad5932e6 legacy-trunk

Fix refcounting leak in charmaptranslate_lookup()
author Walter Dörwald <walter@livinglogic.de>
date Fri, 15 Aug 2003 16:52:19 +0000
parents 443533d08783
children 7ab1a41f16da
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Fri Aug 15 16:26:34 2003 +0000
+++ b/Objects/unicodeobject.c	Fri Aug 15 16:52:19 2003 +0000
@@ -3202,6 +3202,7 @@
 	/* wrong return value */
 	PyErr_SetString(PyExc_TypeError,
 	      "character mapping must return integer, None or unicode");
+	Py_DECREF(x);
 	return -1;
     }
 }