Backport r54757 - missing NULL checks.

This commit is contained in:
Georg Brandl 2007-04-21 07:22:57 +00:00
parent 9319e43c67
commit 1dfa8ac6f1
2 changed files with 10 additions and 0 deletions

View file

@ -33,6 +33,8 @@ BaseException_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyBaseExceptionObject *self;
self = (PyBaseExceptionObject *)type->tp_alloc(type, 0);
if (!self)
return NULL;
/* the dict is created on the fly in PyObject_GenericSetAttr */
self->message = self->dict = NULL;