diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 5c7138ec60b..a928fc45cf5 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -131,12 +131,12 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) ns = PyEval_CallObjectWithKeywords(prep, pargs, mkw); Py_DECREF(pargs); Py_DECREF(prep); - if (ns == NULL) { - Py_DECREF(meta); - Py_XDECREF(mkw); - Py_DECREF(bases); - return NULL; - } + } + if (ns == NULL) { + Py_DECREF(meta); + Py_XDECREF(mkw); + Py_DECREF(bases); + return NULL; } cell = PyObject_CallFunctionObjArgs(func, ns, NULL); if (cell != NULL) {