list2set(): PyList_GetItem could fail.

This commit is contained in:
Barry Warsaw 1996-12-13 23:22:42 +00:00
parent 094579e677
commit 24c4b3d4e8

View File

@ -100,7 +100,9 @@ list2set(list, set, fd2obj)
SOCKET v;
/* any intervening fileno() calls could decr this refcnt */
o = PyList_GetItem(list, i);
if (!(o = PyList_GetItem(list, i)))
return NULL;
Py_INCREF(o);
if (PyInt_Check(o)) {