diff options
Diffstat (limited to 'source/components/namespace/nsxfeval.c')
-rw-r--r-- | source/components/namespace/nsxfeval.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c index a1af583..e0022a8 100644 --- a/source/components/namespace/nsxfeval.c +++ b/source/components/namespace/nsxfeval.c @@ -92,7 +92,7 @@ AcpiEvaluateObjectTyped ( ACPI_OBJECT_TYPE ReturnType) { ACPI_STATUS Status; - BOOLEAN MustFree = FALSE; + BOOLEAN FreeBufferOnError = FALSE; ACPI_FUNCTION_TRACE (AcpiEvaluateObjectTyped); @@ -107,12 +107,13 @@ AcpiEvaluateObjectTyped ( if (ReturnBuffer->Length == ACPI_ALLOCATE_BUFFER) { - MustFree = TRUE; + FreeBufferOnError = TRUE; } /* Evaluate the object */ - Status = AcpiEvaluateObject (Handle, Pathname, ExternalParams, ReturnBuffer); + Status = AcpiEvaluateObject (Handle, Pathname, + ExternalParams, ReturnBuffer); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -147,13 +148,14 @@ AcpiEvaluateObjectTyped ( AcpiUtGetTypeName (((ACPI_OBJECT *) ReturnBuffer->Pointer)->Type), AcpiUtGetTypeName (ReturnType))); - if (MustFree) + if (FreeBufferOnError) { /* - * Caller used ACPI_ALLOCATE_BUFFER, free the return buffer. + * Free a buffer created via ACPI_ALLOCATE_BUFFER. * Note: We use AcpiOsFree here because AcpiOsAllocate was used - * to allocate the buffer. This purposefully bypasses the internal - * allocation tracking mechanism (if it is enabled). + * to allocate the buffer. This purposefully bypasses the + * (optionally enabled) allocation tracking mechanism since we + * only want to track internal allocations. */ AcpiOsFree (ReturnBuffer->Pointer); ReturnBuffer->Pointer = NULL; |