diff options
author | Georg Brandl <georg@python.org> | 2006-03-17 19:03:25 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-03-17 19:03:25 (GMT) |
commit | 5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa (patch) | |
tree | 26fd8d333d8b7fdde9e4b4bb2c39082d9a3d29d0 /Modules/gcmodule.c | |
parent | a5a0704942fcd422f817c9b34e77a2346ddcf102 (diff) | |
download | cpython-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/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ gc_get_referrers(PyObject *self, PyObject *args) { 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); |