mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-40061: Fix a possible refleak in _asynciomodule.c (GH-19748)
tup should be decrefed in the unlikely event of a PyList_New() failure.
This commit is contained in:
parent
735d902b36
commit
7b78e7f9fd
1 changed files with 1 additions and 0 deletions
|
@ -710,6 +710,7 @@ future_add_done_callback(FutureObj *fut, PyObject *arg, PyObject *ctx)
|
|||
else {
|
||||
fut->fut_callbacks = PyList_New(1);
|
||||
if (fut->fut_callbacks == NULL) {
|
||||
Py_DECREF(tup);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue