CID 1292510: Handle allocation failure.

This commit is contained in:
christos 2015-08-26 01:54:57 +00:00
parent f922511816
commit dd6caf1efe
1 changed files with 9 additions and 3 deletions

View File

@ -604,9 +604,15 @@ AcpiDsCreateOperand (
/* TBD: May only be temporary */
ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
strncpy (ObjDesc->String.Pointer, NameString, NameLength);
Status = AE_OK;
if (!ObjDesc)
{
Status = AE_NO_MEMORY;
}
else
{
strncpy (ObjDesc->String.Pointer, NameString, NameLength);
Status = AE_OK;
}
}
else
{