summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-02-07 06:58:52 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-02-07 06:58:52 (GMT)
commit02876df9de428c88f288808ec5c302419d79b8e6 (patch)
tree9d3297bba50bd1f23e888828af71a8a430a284f4 /Modules
parent0075690ced8026e68cf96e3bf9310c9002b2d36f (diff)
downloadcpython-02876df9de428c88f288808ec5c302419d79b8e6.zip
cpython-02876df9de428c88f288808ec5c302419d79b8e6.tar.gz
cpython-02876df9de428c88f288808ec5c302419d79b8e6.tar.bz2
Check return results for errors
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_elementtree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index ea5aa6c..a43fe2e 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -905,6 +905,9 @@ element_getiterator(ElementObject* self, PyObject* args)
}
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 @@ init_elementtree(void)
/* python glue code */
g = PyDict_New();
+ if (g == NULL)
+ return;
PyDict_SetItemString(g, "__builtins__", PyEval_GetBuiltins());