Kaydet (Commit) e6a55dd8 authored tarafından Xiang Zhang's avatar Xiang Zhang Kaydeden (comit) GitHub

bpo-29874: fix INCREF for possible NULL values in select_select() (GH-758)

üst 827c7832
...@@ -289,9 +289,9 @@ select_select(PyObject *self, PyObject *args) ...@@ -289,9 +289,9 @@ select_select(PyObject *self, PyObject *args)
else else
ret = PyTuple_Pack(3, ifdlist, ofdlist, efdlist); ret = PyTuple_Pack(3, ifdlist, ofdlist, efdlist);
Py_DECREF(ifdlist); Py_XDECREF(ifdlist);
Py_DECREF(ofdlist); Py_XDECREF(ofdlist);
Py_DECREF(efdlist); Py_XDECREF(efdlist);
} }
finally: finally:
...@@ -1298,7 +1298,7 @@ kqueue_event_init(kqueue_event_Object *self, PyObject *args, PyObject *kwds) ...@@ -1298,7 +1298,7 @@ kqueue_event_init(kqueue_event_Object *self, PyObject *args, PyObject *kwds)
if (PyLong_Check(pfd) if (PyLong_Check(pfd)
#if IDENT_TYPE == T_UINT #if IDENT_TYPE == T_UINT
&& PyLong_AsUnsignedLong(pfd) <= UINT_MAX && PyLong_AsUnsignedLong(pfd) <= UINT_MAX
#endif #endif
) { ) {
self->e.ident = IDENT_AsType(pfd); self->e.ident = IDENT_AsType(pfd);
......
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