diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 08608c0508137a..05b789b608c0c7 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -3748,6 +3748,7 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop) Py_DECREF(loop); return NULL; } + Py_DECREF(eager_tasks); PyObject *eager_iter = PyObject_GetIter(eager_tasks); if (eager_iter == NULL) { Py_DECREF(tasks);