summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-02-21 16:26:47 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-02-21 16:26:47 (GMT)
commit7be5b78b4f06bfbb07dccb054ad4855d48c7bccb (patch)
tree5262712e652c9312618ef649f98c64d821f6092b /Objects
parent98a755ded4fca82e3b304a15aab4a1c82409f739 (diff)
downloadcpython-7be5b78b4f06bfbb07dccb054ad4855d48c7bccb.zip
cpython-7be5b78b4f06bfbb07dccb054ad4855d48c7bccb.tar.gz
cpython-7be5b78b4f06bfbb07dccb054ad4855d48c7bccb.tar.bz2
Merged revisions 88456 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88456 | martin.v.loewis | 2011-02-21 17:24:00 +0100 (Mo, 21 Feb 2011) | 2 lines - Check for NULL result in PyType_FromSpec. ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index b1fe44e..7a1aa77 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2330,6 +2330,8 @@ PyObject* PyType_FromSpec(PyType_Spec *spec)
char *res_start = (char*)res;
PyType_Slot *slot;
+ if (res == NULL)
+ return NULL;
res->ht_name = PyUnicode_FromString(spec->name);
if (!res->ht_name)
goto fail;