Browse Source

bpo-40061: Fix a possible refleak in _asynciomodule.c (GH-19748)

tup should be decrefed in the unlikely event of a PyList_New()
failure.
pull/20537/head
Zackery Spytz 6 years ago
committed by GitHub
parent
commit
7b78e7f9fd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Modules/_asynciomodule.c

1
Modules/_asynciomodule.c

@ -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…
Cancel
Save