[Python-checkins] r78506 - python/branches/py3k/Python/bltinmodule.c

benjamin.peterson python-checkins at python.org
Sat Feb 27 18:41:13 CET 2010


Author: benjamin.peterson
Date: Sat Feb 27 18:41:13 2010
New Revision: 78506

Log:
check PyDict_New() for error

Modified:
   python/branches/py3k/Python/bltinmodule.c

Modified: python/branches/py3k/Python/bltinmodule.c
==============================================================================
--- python/branches/py3k/Python/bltinmodule.c	(original)
+++ python/branches/py3k/Python/bltinmodule.c	Sat Feb 27 18:41:13 2010
@@ -131,12 +131,12 @@
 		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) {


More information about the Python-checkins mailing list