Kaydet (Commit) 0523c39e authored tarafından Zackery Spytz's avatar Zackery Spytz Kaydeden (comit) Serhiy Storchaka

bpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551)

üst 3e700e4c
......@@ -4089,6 +4089,7 @@ itertools_count_impl(PyTypeObject *type, PyObject *long_cnt,
lz = (countobject *)type->tp_alloc(type, 0);
if (lz == NULL) {
Py_XDECREF(long_cnt);
Py_DECREF(long_step);
return NULL;
}
lz->cnt = cnt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment