commit | 1dfa8ac6f12a9ebffd7839f0b9b97b170b794b89 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sat Apr 21 07:22:57 2007 +0000 |
committer | Georg Brandl <georg@python.org> | Sat Apr 21 07:22:57 2007 +0000 |
tree | b03f9457aac6b9ee4cd320f5bb6cbea14de1461c | |
parent | 9319e43c675920fa69d1461bf9c6bb451647ae4d [diff] [blame] |
Backport r54757 - missing NULL checks.
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 0cd819c..b73a3f0 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c
@@ -33,6 +33,8 @@ 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;