summaryrefslogtreecommitdiffstats
path: root/Modules/cPickle.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-03-06 01:39:39 (GMT)
committerGuido van Rossum <guido@python.org>1998-03-06 01:39:39 (GMT)
commit8a6dba3562ea47353e8469931f5e32e1d038e10d (patch)
treec5f0f05e8ab89e90773dfb76bb76d0f9a05e92c4 /Modules/cPickle.c
parent88b02cf346da9c648bddd762d49fae9e33f9a6c7 (diff)
downloadcpython-8a6dba3562ea47353e8469931f5e32e1d038e10d.zip
cpython-8a6dba3562ea47353e8469931f5e32e1d038e10d.tar.gz
cpython-8a6dba3562ea47353e8469931f5e32e1d038e10d.tar.bz2
Clear class_map in constructor so that when it later detects an error
and the destructor is called early, it doesn't DECREF garbage.
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r--Modules/cPickle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 6244f8b..db72bf9 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -3906,7 +3906,8 @@ newUnpicklerobject(PyObject *f) {
self->marks_size = 0;
self->buf_size = 0;
self->read = NULL;
- self->readline = NULL;
+ self->readline = NULL;
+ self->class_map = NULL;
UNLESS(self->memo = PyDict_New()) {
Py_XDECREF((PyObject *)self);