summaryrefslogtreecommitdiff
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-03-17 19:03:25 +0000
committerGeorg Brandl <georg@python.org>2006-03-17 19:03:25 +0000
commitdc96037cd72cb58df72e0025c7892f5b742276bb (patch)
tree4f7699c03441c122b4b37e19e4756b4c18a57952 /Modules/gcmodule.c
parent2cdaa06e3602d2f7e3dc8a2edc9b00d49f519948 (diff)
downloadcpython-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.c2
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);