mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
- Check for NULL result in PyType_FromSpec.
This commit is contained in:
parent
2cebdd4865
commit
5e06a5d4cd
2 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue