Skip to content

Commit bdd7646

Browse files
committed
_PyObject_LookupSpecial returns a new reference
1 parent 5a0791b commit bdd7646

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Objects/abstract.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ PyObject_Format(PyObject* obj, PyObject *format_spec)
836836
}
837837
/* And call it. */
838838
result = PyObject_CallFunctionObjArgs(method, format_spec, NULL);
839+
Py_DECREF(method);
839840
}
840841

841842
if (result == NULL)

0 commit comments

Comments
 (0)