diff --git a/Python/errors.c b/Python/errors.c index 275a0656f6b..8327f5395d3 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -604,7 +604,7 @@ PyErr_WriteUnraisable(PyObject *obj) PyFile_WriteString(": ", f); PyFile_WriteObject(v, f, 0); } - Py_DECREF(moduleName); + Py_XDECREF(moduleName); } PyFile_WriteString(" in ", f); PyFile_WriteObject(obj, f, 0);