Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bad8497

Browse filesBrowse files
[3.12] gh-122311: Fix a refleak in pickle (GH-122411) (GH-122416)
(cherry picked from commit 68840e9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent e6878fc commit bad8497
Copy full SHA for bad8497

File tree

1 file changed

+1
-0
lines changed
Filter options

1 file changed

+1
-0
lines changed

‎Modules/_pickle.c

Copy file name to clipboardExpand all lines: Modules/_pickle.c
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3188,6 +3188,7 @@ batch_dict(PickleState *state, PicklerObject *self, PyObject *iter)
31883188
if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 2) {
31893189
PyErr_SetString(PyExc_TypeError, "dict items "
31903190
"iterator must return 2-tuples");
3191+
Py_DECREF(obj);
31913192
return -1;
31923193
}
31933194
i = save(state, self, PyTuple_GET_ITEM(obj, 0), 0);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.