mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Fix reference leak in _pickle.
This commit is contained in:
parent
6b02772c13
commit
637c7c475a
1 changed files with 2 additions and 0 deletions
|
|
@ -5039,11 +5039,13 @@ do_append(UnpicklerObject *self, Py_ssize_t x)
|
||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
Pdata_clear(self->stack, i + 1);
|
Pdata_clear(self->stack, i + 1);
|
||||||
Py_SIZE(self->stack) = x;
|
Py_SIZE(self->stack) = x;
|
||||||
|
Py_DECREF(append_func);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
}
|
}
|
||||||
Py_SIZE(self->stack) = x;
|
Py_SIZE(self->stack) = x;
|
||||||
|
Py_DECREF(append_func);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue