diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index 2e27d48b147..dbe022e91d1 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -1424,9 +1424,11 @@ _functools_exec(PyObject *module) &lru_cache_type }; - kwd_mark = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type); if (!kwd_mark) { - return -1; + kwd_mark = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type); + if (!kwd_mark) { + return -1; + } } for (size_t i = 0; i < Py_ARRAY_LENGTH(typelist); i++) {