Skip to content

Commit

Permalink
pythongh-122311: Fix a refleak in pickle (pythonGH-122411)
Browse files Browse the repository at this point in the history
(cherry picked from commit 68840e9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
serhiy-storchaka authored and miss-islington committed Jul 29, 2024
1 parent 5bd2ea2 commit 4993303
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Modules/_pickle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3188,6 +3188,7 @@ batch_dict(PickleState *state, PicklerObject *self, PyObject *iter)
if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 2) {
PyErr_SetString(PyExc_TypeError, "dict items "
"iterator must return 2-tuples");
Py_DECREF(obj);
return -1;
}
i = save(state, self, PyTuple_GET_ITEM(obj, 0), 0);
Expand Down

0 comments on commit 4993303

Please sign in to comment.