Fix refcounting leak in charmaptranslate_lookup()
This commit is contained in:
parent
9b30f206ee
commit
150523efa5
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue