From cda99b4022daa08ac74b0420e9903cce883d91c6 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 11 Nov 2020 17:48:53 +0200 Subject: [PATCH] Fix memory leak introduced by GH-22780 (GH-23237) --- Modules/_asynciomodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index d1d0f6bc75e..01e36c656da 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -1628,6 +1628,7 @@ FutureIter_am_send(futureiterobject *it, it->future = NULL; res = _asyncio_Future_result_impl(fut); if (res != NULL) { + Py_DECREF(fut); *result = res; return PYGEN_RETURN; }