diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index d428c66e39e..3b4ccfd0696 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -993,7 +993,7 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f) else { bytes_read = readinst(buf, BUF_SIZE, readmethod); if (bytes_read < 0) { - Py_DECREF(readmethod); + Py_XDECREF(readmethod); return NULL; } }