Commit da34fdb3 authored by Jim Fulton's avatar Jim Fulton

Initialize class_map to avoid core dump on error.

parent a8115114
/* /*
$Id: cPickle.c,v 1.48 1997/12/07 14:37:39 jim Exp $ $Id: cPickle.c,v 1.49 1998/03/06 14:23:08 jim Exp $
Copyright Copyright
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
static char cPickle_module_documentation[] = static char cPickle_module_documentation[] =
"C implementation and optimization of the Python pickle module\n" "C implementation and optimization of the Python pickle module\n"
"\n" "\n"
"$Id: cPickle.c,v 1.48 1997/12/07 14:37:39 jim Exp $\n" "$Id: cPickle.c,v 1.49 1998/03/06 14:23:08 jim Exp $\n"
; ;
#include "Python.h" #include "Python.h"
...@@ -3908,6 +3908,7 @@ newUnpicklerobject(PyObject *f) { ...@@ -3908,6 +3908,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);
...@@ -4307,7 +4308,7 @@ init_stuff(PyObject *module, PyObject *module_dict) { ...@@ -4307,7 +4308,7 @@ init_stuff(PyObject *module, PyObject *module_dict) {
void void
initcPickle() { initcPickle() {
PyObject *m, *d, *v; PyObject *m, *d, *v;
char *rev="$Revision: 1.48 $"; char *rev="$Revision: 1.49 $";
PyObject *format_version; PyObject *format_version;
PyObject *compatible_formats; PyObject *compatible_formats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment