summaryrefslogtreecommitdiff
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-04-21 07:22:57 +0000
committerGeorg Brandl <georg@python.org>2007-04-21 07:22:57 +0000
commit1dfa8ac6f12a9ebffd7839f0b9b97b170b794b89 (patch)
treeb03f9457aac6b9ee4cd320f5bb6cbea14de1461c /Objects/exceptions.c
parent9319e43c675920fa69d1461bf9c6bb451647ae4d (diff)
downloadcpython-git-1dfa8ac6f12a9ebffd7839f0b9b97b170b794b89.tar.gz
Backport r54757 - missing NULL checks.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 0cd819c5a1..b73a3f0b7e 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -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;