mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
list2set(): PyList_GetItem could fail.
This commit is contained in:
parent
094579e677
commit
24c4b3d4e8
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user