Fix possible memory leak.

Ensure cleanup after a memory allocation failure in dsmethod.c.
Original Linux change from Jesper Juhl.
This commit is contained in:
Robert Moore 2012-10-23 09:33:10 -07:00
parent 27d3c34f82
commit 05432f7a2f

View File

@ -481,7 +481,8 @@ AcpiDsCallControlMethod (
Info = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
if (!Info)
{
return_ACPI_STATUS (AE_NO_MEMORY);
Status = AE_NO_MEMORY;
goto Cleanup;
}
Info->Parameters = &ThisWalkState->Operands[0];