_PyObject_LookupSpecial returns a new reference

This commit is contained in:
Benjamin Peterson 2010-06-05 02:07:01 +00:00
parent 67783b1f71
commit d5adb5d73d
1 changed files with 1 additions and 0 deletions

View File

@ -836,6 +836,7 @@ PyObject_Format(PyObject* obj, PyObject *format_spec)
}
/* And call it. */
result = PyObject_CallFunctionObjArgs(method, format_spec, NULL);
Py_DECREF(method);
}
if (result == NULL)