mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (#121136)
PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
This commit is contained in:
parent
e6543daf12
commit
92893fd8dc
1 changed files with 2 additions and 0 deletions
|
|
@ -6524,11 +6524,13 @@ load_additems(PickleState *state, UnpicklerObject *self)
|
|||
if (result == NULL) {
|
||||
Pdata_clear(self->stack, i + 1);
|
||||
Py_SET_SIZE(self->stack, mark);
|
||||
Py_DECREF(add_func);
|
||||
return -1;
|
||||
}
|
||||
Py_DECREF(result);
|
||||
}
|
||||
Py_SET_SIZE(self->stack, mark);
|
||||
Py_DECREF(add_func);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue