mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +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
|
|
@ -3907,6 +3907,7 @@ newUnpicklerobject(PyObject *f) {
|
||||||
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