Check for NULL return value in PyStructSequence_NewType(). Found by Coverity.
This commit is contained in:
parent
3c6661a914
commit
6b962860e2
|
@ -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…
Reference in New Issue