This commit is contained in:
Benjamin Peterson 2011-10-17 13:10:24 -04:00
commit 897d059221
1 changed files with 6 additions and 2 deletions

View File

@ -347,9 +347,13 @@ slice_richcompare(PyObject *v, PyObject *w, int op)
}
t1 = PyTuple_New(3);
t2 = PyTuple_New(3);
if (t1 == NULL || t2 == NULL)
if (t1 == NULL)
return NULL;
t2 = PyTuple_New(3);
if (t2 == NULL) {
Py_DECREF(t1);
return NULL;
}
PyTuple_SET_ITEM(t1, 0, ((PySliceObject *)v)->start);
PyTuple_SET_ITEM(t1, 1, ((PySliceObject *)v)->stop);