8000 [3.7] bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195) by miss-islington · Pull Request #17197 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.7] bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195) #17197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)
https://bugs.python.org/issue38823
(cherry picked from commit c3f6bdc)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
  • Loading branch information
brandtbucher authored and miss-islington committed Nov 16, 2019
commit 695a0cc31174ffd4de956b08ce8a4aef2ed903f9
4 changes: 4 additions & 0 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3361,24 +3361,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;
}

Expand Down
0