mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Check for NULL return value in PyStructSequence_NewType(). Found by Coverity.
This commit is contained in:
parent
3c6661a914
commit
6b962860e2
1 changed files with 3 additions and 1 deletions
|
@ -383,6 +383,8 @@ PyTypeObject*
|
|||
PyStructSequence_NewType(PyStructSequence_Desc *desc)
|
||||
{
|
||||
PyTypeObject *result = (PyTypeObject*)PyType_GenericAlloc(&PyType_Type, 0);
|
||||
PyStructSequence_InitType(result, desc);
|
||||
if (result != NULL) {
|
||||
PyStructSequence_InitType(result, desc);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue