diff options
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 6832fd96ab..2b05cc58d1 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -24,6 +24,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; |