Kaydet (Commit) 024abca0 authored tarafından Jesus Cea's avatar Jesus Cea

MERGE: Closes #15395: memory leaks in selectmodule.c

...@@ -107,7 +107,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1]) ...@@ -107,7 +107,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 );
...@@ -438,6 +438,7 @@ poll_modify(pollObject *self, PyObject *args) ...@@ -438,6 +438,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_OSError); PyErr_SetFromErrno(PyExc_OSError);
Py_DECREF(key);
return NULL; return NULL;
} }
value = PyLong_FromLong(events); value = PyLong_FromLong(events);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment