mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
Clear class_map in constructor so that when it later detects an error
and the destructor is called early, it doesn't DECREF garbage.
This commit is contained in:
parent
88b02cf346
commit
8a6dba3562
1 changed files with 2 additions and 1 deletions
|
|
@ -3906,7 +3906,8 @@ newUnpicklerobject(PyObject *f) {
|
||||||
self->marks_size = 0;
|
self->marks_size = 0;
|
||||||
self->buf_size = 0;
|
self->buf_size = 0;
|
||||||
self->read = NULL;
|
self->read = NULL;
|
||||||
self->readline = NULL;
|
self->readline = NULL;
|
||||||
|
self->class_map = NULL;
|
||||||
|
|
||||||
UNLESS(self->memo = PyDict_New()) {
|
UNLESS(self->memo = PyDict_New()) {
|
||||||
Py_XDECREF((PyObject *)self);
|
Py_XDECREF((PyObject *)self);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue