diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-12-02 18:31:02 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-12-02 18:31:02 +0000 |
commit | a3a165d6987fcb09c541342fb52c4051ce559e60 (patch) | |
tree | 8764b0112e2516ab60f24707427e8ec9f22baada /Modules | |
parent | 3de78fbc468af76fe5268b9ade4e20db5e23bebc (diff) | |
download | cpython-a3a165d6987fcb09c541342fb52c4051ce559e60.tar.gz |
Check for NULL return value of PyList_New (follow-up to patch #486743).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/gcmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 7f8d71a3e6..b607d38b40 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -724,6 +724,9 @@ gc_get_objects(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, ":get_objects")) /* check no args */ return NULL; result = PyList_New(0); + if (result == NULL) { + return NULL; + } if (append_objects(result, &_PyGC_generation0) || append_objects(result, &generation1) || append_objects(result, &generation2)) { |