]> granicus.if.org Git - python/commitdiff
Need to initialize self->safe_constructors early on to prevent crash
authorGuido van Rossum <guido@python.org>
Fri, 11 Dec 1998 03:20:00 +0000 (03:20 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 11 Dec 1998 03:20:00 +0000 (03:20 +0000)
in early dealloc.  Patch by Andrew Dalke.

Modules/cPickle.c

index 90e56109435a2edd59b3c9870fdd89e2ca9dbe2d..a73a7874f5e7f8fc59f49cc3bd08663591c86535 100644 (file)
@@ -3865,6 +3865,7 @@ newUnpicklerobject(PyObject *f) {
     self->buf_size = 0;
     self->read = NULL;
     self->readline = NULL;
+    self->safe_constructors = NULL;
 
     UNLESS (self->memo = PyDict_New()) {
        Py_XDECREF((PyObject *)self);