diff Python/symtable.c @ 39139:75a7106662a3 legacy-trunk

Handle more mem alloc issues found with failmalloc
author Neal Norwitz <nnorwitz@gmail.com>
date Sun, 23 Jul 2006 07:50:36 +0000
parents 12e973bdfeee
children e11caad7e029
line wrap: on
line diff
--- a/Python/symtable.c	Sun Jul 23 04:19:49 2006 +0000
+++ b/Python/symtable.c	Sun Jul 23 07:50:36 2006 +0000
@@ -529,6 +529,8 @@
 		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;