mirror of
https://github.com/python/cpython.git
synced 2025-11-07 09:02:02 +00:00
[3.11] gh-101765: Fix refcount issues in list and unicode pickling (GH-102265) (#102268)
(cherry picked from commit d71edbd1b7)
This commit is contained in:
parent
735ff5ae27
commit
b36c49899b
2 changed files with 11 additions and 1 deletions
|
|
@ -15767,8 +15767,10 @@ unicodeiter_reduce(unicodeiterobject *it, PyObject *Py_UNUSED(ignored))
|
|||
return Py_BuildValue("N(O)n", iter, it->it_seq, it->it_index);
|
||||
} else {
|
||||
PyObject *u = (PyObject *)_PyUnicode_New(0);
|
||||
if (u == NULL)
|
||||
if (u == NULL) {
|
||||
Py_DECREF(iter);
|
||||
return NULL;
|
||||
}
|
||||
return Py_BuildValue("N(N)", iter, u);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue