Fix some missing checks after PyTuple_New, PyList_New, PyDict_New

This commit is contained in:
Georg Brandl 2006-03-17 19:03:25 +00:00
parent a5a0704942
commit 5c170fd4a9
7 changed files with 27 additions and 7 deletions

View file

@ -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);