]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix memory leak introduced by GH-22780 (GH-23237)
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Wed, 11 Nov 2020 15:48:53 +0000 (17:48 +0200)
committerGitHub <noreply@github.com>
Wed, 11 Nov 2020 15:48:53 +0000 (17:48 +0200)
Modules/_asynciomodule.c

index d1d0f6bc75e4248ca3ca9653dacc8879175e8cd2..01e36c656da8fb83eab7f9bb67807e8b43530862 100644 (file)
@@ -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;
     }