Commit a3a165d6 authored by Martin v. Löwis's avatar Martin v. Löwis

Check for NULL return value of PyList_New (follow-up to patch #486743).

parent 3de78fbc
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment