From: Benjamin Peterson Date: Sat, 27 Feb 2010 17:41:13 +0000 (+0000) Subject: check PyDict_New() for error X-Git-Tag: v3.2a1~1608 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09259e2043289347cc90ec98578228548668b105;p=python check PyDict_New() for error --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 5c7138ec60..a928fc45cf 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) {