Skip to content

Commit

Permalink
[3.13] pythongh-122311: Fix a refleak in pickle (pythonGH-122411) (py…
Browse files Browse the repository at this point in the history
…thonGH-122415)

(cherry picked from commit 68840e9)

Co-authored-by: Serhiy Storchaka <[email protected]>
  • Loading branch information
miss-islington and serhiy-storchaka authored Jul 29, 2024
1 parent 9f6f879 commit d8701e2
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 @@ -3123,6 +3123,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 d8701e2

Please sign in to comment.