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
  • Loading branch information
serhiy-storchaka authored Jul 29, 2024
1 parent 490e0ad commit 68840e9
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 68840e9

Please sign in to comment.