summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-03 12:36:46 (GMT)
committerGitHub <noreply@github.com>2020-06-03 12:36:46 (GMT)
commit18a90248fdd92b27098cc4db773686a2d10a4d24 (patch)
tree8b12f07f0eeda0c0d401465487d9c9353412fd68 /Modules
parent317bab0bf61e4cbab37c81baf185d8b57ca62a6b (diff)
downloadcpython-18a90248fdd92b27098cc4db773686a2d10a4d24.zip
cpython-18a90248fdd92b27098cc4db773686a2d10a4d24.tar.gz
cpython-18a90248fdd92b27098cc4db773686a2d10a4d24.tar.bz2
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).
Diffstat (limited to 'Modules')
-rw-r--r--Modules/selectmodule.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 04e0067..adf014f 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -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