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

Skip to content

Commit 637c7c4

Browse files
committed
Fix reference leak in _pickle.
1 parent 6b02772 commit 637c7c4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/_pickle.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5039,11 +5039,13 @@ do_append(UnpicklerObject *self, Py_ssize_t x)
50395039
if (result == NULL) {
50405040
Pdata_clear(self->stack, i + 1);
50415041
Py_SIZE(self->stack) = x;
5042+
Py_DECREF(append_func);
50425043
return -1;
50435044
}
50445045
Py_DECREF(result);
50455046
}
50465047
Py_SIZE(self->stack) = x;
5048+
Py_DECREF(append_func);
50475049
}
50485050

50495051
return 0;

0 commit comments

Comments
 (0)