From: Andrew Svetlov Date: Wed, 11 Nov 2020 15:48:53 +0000 (+0200) Subject: Fix memory leak introduced by GH-22780 (GH-23237) X-Git-Tag: v3.10.0a3~223 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cda99b4022daa08ac74b0420e9903cce883d91c6;p=thirdparty%2FPython%2Fcpython.git Fix memory leak introduced by GH-22780 (GH-23237) --- diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index d1d0f6bc75e4..01e36c656da8 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; }