summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2020-11-11 15:48:53 (GMT)
committerGitHub <noreply@github.com>2020-11-11 15:48:53 (GMT)
commitcda99b4022daa08ac74b0420e9903cce883d91c6 (patch)
treea7b3ccd40ef5ba4e3048f2f32d533c0548101df8
parentba2958ed40d284228836735cbed4a155190e0998 (diff)
downloadcpython-cda99b4022daa08ac74b0420e9903cce883d91c6.zip
cpython-cda99b4022daa08ac74b0420e9903cce883d91c6.tar.gz
cpython-cda99b4022daa08ac74b0420e9903cce883d91c6.tar.bz2
Fix memory leak introduced by GH-22780 (GH-23237)
-rw-r--r--Modules/_asynciomodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index d1d0f6b..01e36c6 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;
}