diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-02-27 17:41:13 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-02-27 17:41:13 (GMT) |
commit | 09259e2043289347cc90ec98578228548668b105 (patch) | |
tree | ff422acf22d7699de8fccc4fddddc2018a3c0637 | |
parent | 23e018ab9893369e7669631af16016b83b0de09b (diff) | |
download | cpython-09259e2043289347cc90ec98578228548668b105.zip cpython-09259e2043289347cc90ec98578228548668b105.tar.gz cpython-09259e2043289347cc90ec98578228548668b105.tar.bz2 |
check PyDict_New() for error
-rw-r--r-- | Python/bltinmodule.c | 12 |
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) { |