mirror of https://github.com/python/cpython
Fix refleak
This commit is contained in:
parent
5e9f94ac7a
commit
ae6b84184b
|
@ -23,6 +23,7 @@ set_key_error(PyObject *arg)
|
||||||
if (!tup)
|
if (!tup)
|
||||||
return; /* caller will expect error to be set anyway */
|
return; /* caller will expect error to be set anyway */
|
||||||
PyErr_SetObject(PyExc_KeyError, tup);
|
PyErr_SetObject(PyExc_KeyError, tup);
|
||||||
|
Py_DECREF(tup);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Define this out if you don't want conversion statistics on exit. */
|
/* Define this out if you don't want conversion statistics on exit. */
|
||||||
|
|
Loading…
Reference in New Issue