Kaydet (Commit) 547d4859 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

plug reference leak

üst 00fa0390
......@@ -307,11 +307,13 @@ compute_range_item(rangeobject *r, PyObject *arg)
static PyObject *
range_item(rangeobject *r, Py_ssize_t i)
{
PyObject *arg = PyLong_FromLong(i);
PyObject *res, *arg = PyLong_FromLong(i);
if (!arg) {
return NULL;
}
return compute_range_item(r, arg);
res = compute_range_item(r, arg);
Py_DECREF(arg);
return res;
}
/* Additional helpers, since the standard slice helpers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment