commit | 5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Fri Mar 17 19:03:25 2006 +0000 |
committer | Georg Brandl <georg@python.org> | Fri Mar 17 19:03:25 2006 +0000 |
tree | 26fd8d333d8b7fdde9e4b4bb2c39082d9a3d29d0 | |
parent | a5a0704942fcd422f817c9b34e77a2346ddcf102 [diff] [blame] |
Fix some missing checks after PyTuple_New, PyList_New, PyDict_New
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 7e3f95a..3d49f6c 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c
@@ -1085,6 +1085,8 @@ { int i; PyObject *result = PyList_New(0); + if (!result) return NULL; + for (i = 0; i < NUM_GENERATIONS; i++) { if (!(gc_referrers_for(args, GEN_HEAD(i), result))) { Py_DECREF(result);