mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Fix refleak in chain().
This commit is contained in:
parent
a28df13a9d
commit
f1cca2b593
1 changed files with 1 additions and 1 deletions
|
@ -1682,8 +1682,8 @@ chain_next(chainobject *lz)
|
|||
return NULL; /* no more input sources */
|
||||
}
|
||||
lz->active = PyObject_GetIter(iterable);
|
||||
Py_DECREF(iterable);
|
||||
if (lz->active == NULL) {
|
||||
Py_DECREF(iterable);
|
||||
Py_CLEAR(lz->source);
|
||||
return NULL; /* input not iterable */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue