Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ac5380

Browse files
Issue #25761: Fixed reference leak added in previous changeset (5c670af0100f).
1 parent ef3a676 commit 3ac5380

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/_pickle.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5152,6 +5152,7 @@ load_dict(UnpicklerObject *self)
51525152
if ((j - i) % 2 != 0) {
51535153
PickleState *st = _Pickle_GetGlobalState();
51545154
PyErr_SetString(st->UnpicklingError, "odd number of items for DICT");
5155+
Py_DECREF(dict);
51555156
return -1;
51565157
}
51575158

0 commit comments

Comments
 (0)