mirror of https://github.com/python/cpython
bpo-32604: Fix reference leak in select module (GH-20600)
Fix reference leak in PyInit_select() of the select module: remove Py_INCREF(poll_Type).
This commit is contained in:
parent
317bab0bf6
commit
18a90248fd
|
@ -0,0 +1,2 @@
|
|||
Fix reference leak in the :mod:`select` module when the the module is
|
||||
imported in a subinterpreter.
|
|
@ -2482,7 +2482,6 @@ PyInit_select(void)
|
|||
if (poll_Type == NULL)
|
||||
return NULL;
|
||||
get_select_state(m)->poll_Type = (PyTypeObject *)poll_Type;
|
||||
Py_INCREF(poll_Type);
|
||||
|
||||
PyModule_AddIntMacro(m, POLLIN);
|
||||
PyModule_AddIntMacro(m, POLLPRI);
|
||||
|
@ -2518,7 +2517,6 @@ PyInit_select(void)
|
|||
if (devpoll_Type == NULL)
|
||||
return NULL;
|
||||
get_select_state(m)->devpoll_Type = (PyTypeObject *)devpoll_Type;
|
||||
Py_INCREF(devpoll_Type);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EPOLL
|
||||
|
|
Loading…
Reference in New Issue