mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
bpo-31861: Fix reference leak in builtin_anext_impl() (GH-25008)
This commit is contained in:
parent
8370e07e1e
commit
a02683ac38
@ -1660,7 +1660,10 @@ builtin_anext_impl(PyObject *module, PyObject *aiterator,
|
||||
return awaitable;
|
||||
}
|
||||
|
||||
return PyAnextAwaitable_New(awaitable, default_value);
|
||||
PyObject* new_awaitable = PyAnextAwaitable_New(
|
||||
awaitable, default_value);
|
||||
Py_DECREF(awaitable);
|
||||
return new_awaitable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user