check PyDict_New() for error

This commit is contained in:
Benjamin Peterson 2010-02-27 17:41:13 +00:00
parent 23e018ab98
commit 09259e2043
1 changed files with 6 additions and 6 deletions

View File

@ -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) {