summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-02-27 17:41:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-02-27 17:41:13 (GMT)
commit09259e2043289347cc90ec98578228548668b105 (patch)
treeff422acf22d7699de8fccc4fddddc2018a3c0637 /Python
parent23e018ab9893369e7669631af16016b83b0de09b (diff)
downloadcpython-09259e2043289347cc90ec98578228548668b105.zip
cpython-09259e2043289347cc90ec98578228548668b105.tar.gz
cpython-09259e2043289347cc90ec98578228548668b105.tar.bz2
check PyDict_New() for error
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 5c7138e..a928fc4 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) {