diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-11-16 22:26:54 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-11-16 22:26:54 (GMT) |
commit | c3f6bdc332d23588102eba749a5929dd5bb67c9d (patch) | |
tree | 7bdbceef1f63cf9234aa6487a4d912308a883e80 /Modules | |
parent | d0acdfcf345b44b01e59f3623dcdab6279de686a (diff) | |
download | cpython-c3f6bdc332d23588102eba749a5929dd5bb67c9d.zip cpython-c3f6bdc332d23588102eba749a5929dd5bb67c9d.tar.gz cpython-c3f6bdc332d23588102eba749a5929dd5bb67c9d.tar.bz2 |
bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)
https://bugs.python.org/issue38823
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_asynciomodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 5e1bcfb..aa46e3c 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -3387,24 +3387,28 @@ PyInit__asyncio(void) Py_INCREF(&FutureType); if (PyModule_AddObject(m, "Future", (PyObject *)&FutureType) < 0) { Py_DECREF(&FutureType); + Py_DECREF(m); return NULL; } Py_INCREF(&TaskType); if (PyModule_AddObject(m, "Task", (PyObject *)&TaskType) < 0) { Py_DECREF(&TaskType); + Py_DECREF(m); return NULL; } Py_INCREF(all_tasks); if (PyModule_AddObject(m, "_all_tasks", all_tasks) < 0) { Py_DECREF(all_tasks); + Py_DECREF(m); return NULL; } Py_INCREF(current_tasks); if (PyModule_AddObject(m, "_current_tasks", current_tasks) < 0) { Py_DECREF(current_tasks); + Py_DECREF(m); return NULL; } |