summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-23 07:50:36 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-23 07:50:36 (GMT)
commit18b6adf9b2f581da04cf5cd6149b84408763ea6e (patch)
tree3c24c102d355d84304002dc67a7ecfef37c6a597 /Python/symtable.c
parentc6bacd5606cbf3f76ae7e116e425a61d291c68fc (diff)
downloadcpython-18b6adf9b2f581da04cf5cd6149b84408763ea6e.zip
cpython-18b6adf9b2f581da04cf5cd6149b84408763ea6e.tar.gz
cpython-18b6adf9b2f581da04cf5cd6149b84408763ea6e.tar.bz2
Handle more mem alloc issues found with failmalloc
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index c010b7a..439a243 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -529,6 +529,8 @@ update_symbols(PyObject *symbols, PyObject *scope,
i = PyInt_AS_LONG(w);
flags |= (i << SCOPE_OFF);
u = PyInt_FromLong(flags);
+ if (!u)
+ return 0;
if (PyDict_SetItem(symbols, name, u) < 0) {
Py_DECREF(u);
return 0;