[Python-checkins] r42251 - python/trunk/Modules/_elementtree.c

neal.norwitz python-checkins at python.org
Tue Feb 7 07:58:54 CET 2006


Author: neal.norwitz
Date: Tue Feb  7 07:58:52 2006
New Revision: 42251

Modified:
   python/trunk/Modules/_elementtree.c
Log:
Check return results for errors

Modified: python/trunk/Modules/_elementtree.c
==============================================================================
--- python/trunk/Modules/_elementtree.c	(original)
+++ python/trunk/Modules/_elementtree.c	Tue Feb  7 07:58:52 2006
@@ -905,6 +905,9 @@
     }
 
     args = PyTuple_New(2);
+    if (args == NULL)
+    	return NULL;
+
     Py_INCREF(self); PyTuple_SET_ITEM(args, 0, (PyObject*) self);
     Py_INCREF(tag);  PyTuple_SET_ITEM(args, 1, (PyObject*) tag);
 
@@ -2596,6 +2599,8 @@
     /* python glue code */
 
     g = PyDict_New();
+    if (g == NULL)
+    	return;
 
     PyDict_SetItemString(g, "__builtins__", PyEval_GetBuiltins());
 


More information about the Python-checkins mailing list