Fix refcounting leak in charmaptranslate_lookup()

This commit is contained in:
Walter Dörwald 2003-08-15 16:52:19 +00:00
parent 9b30f206ee
commit 150523efa5
1 changed files with 1 additions and 0 deletions

View File

@ -3202,6 +3202,7 @@ int charmaptranslate_lookup(Py_UNICODE c, PyObject *mapping, PyObject **result)
/* wrong return value */ /* wrong return value */
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"character mapping must return integer, None or unicode"); "character mapping must return integer, None or unicode");
Py_DECREF(x);
return -1; return -1;
} }
} }