mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Closes #15395: memory leaks in selectmodule.c
This commit is contained in:
parent
ef86d12979
commit
62a5c3216d
1 changed files with 2 additions and 1 deletions
|
@ -101,7 +101,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
|
||||||
|
|
||||||
/* any intervening fileno() calls could decr this refcnt */
|
/* any intervening fileno() calls could decr this refcnt */
|
||||||
if (!(o = PySequence_Fast_GET_ITEM(fast_seq, i)))
|
if (!(o = PySequence_Fast_GET_ITEM(fast_seq, i)))
|
||||||
return -1;
|
goto finally;
|
||||||
|
|
||||||
Py_INCREF(o);
|
Py_INCREF(o);
|
||||||
v = PyObject_AsFileDescriptor( o );
|
v = PyObject_AsFileDescriptor( o );
|
||||||
|
@ -421,6 +421,7 @@ poll_modify(pollObject *self, PyObject *args)
|
||||||
if (PyDict_GetItem(self->dict, key) == NULL) {
|
if (PyDict_GetItem(self->dict, key) == NULL) {
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
PyErr_SetFromErrno(PyExc_IOError);
|
PyErr_SetFromErrno(PyExc_IOError);
|
||||||
|
Py_DECREF(key);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
value = PyLong_FromLong(events);
|
value = PyLong_FromLong(events);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue