diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 6826cf96978..99fa899016f 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -5324,10 +5324,10 @@ slot_tp_str(PyObject *self) func = lookup_method(self, &PyId___str__); if (func == NULL) return NULL; - res = PyEval_CallObject(func, NULL); - Py_DECREF(func); - return res; - } + res = PyEval_CallObject(func, NULL); + Py_DECREF(func); + return res; +} static Py_hash_t slot_tp_hash(PyObject *self)