From 8a6dba3562ea47353e8469931f5e32e1d038e10d Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Fri, 6 Mar 1998 01:39:39 +0000
Subject: Clear class_map in constructor so that when it later detects an error
 and the destructor is called early, it doesn't DECREF garbage.

---
 Modules/cPickle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
-- 
cgit v0.12

