diff options
| author | Georg Brandl <georg@python.org> | 2006-03-17 19:03:25 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2006-03-17 19:03:25 +0000 |
| commit | dc96037cd72cb58df72e0025c7892f5b742276bb (patch) | |
| tree | 4f7699c03441c122b4b37e19e4756b4c18a57952 /Modules/gcmodule.c | |
| parent | 2cdaa06e3602d2f7e3dc8a2edc9b00d49f519948 (diff) | |
| download | cpython-dc96037cd72cb58df72e0025c7892f5b742276bb.tar.gz | |
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 7e3f95a4ca..3d49f6cf5c 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); |
