summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-03-17 19:03:25 (GMT)
committerGeorg Brandl <georg@python.org>2006-03-17 19:03:25 (GMT)
commit5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa (patch)
tree26fd8d333d8b7fdde9e4b4bb2c39082d9a3d29d0 /Modules/pyexpat.c
parenta5a0704942fcd422f817c9b34e77a2346ddcf102 (diff)
downloadcpython-5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa.zip
cpython-5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa.tar.gz
cpython-5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa.tar.bz2
Fix some missing checks after PyTuple_New, PyList_New, PyDict_New
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index e4bf180..b6e927d 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1519,6 +1519,8 @@ xmlparse_getattr(xmlparseobject *self, char *name)
if (strcmp(name, "__members__") == 0) {
int i;
PyObject *rc = PyList_New(0);
+ if (!rc)
+ return NULL;
for (i = 0; handler_info[i].name != NULL; i++) {
PyObject *o = get_handler_name(&handler_info[i]);
if (o != NULL)