summaryrefslogtreecommitdiffstats
path: root/source/components/namespace
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-12-19 05:51:01 +0000
committerjkim <jkim@FreeBSD.org>2013-12-19 05:51:01 +0000
commitb37c83dbb637fc63c5ba07fe61555d4d6e29dd7c (patch)
tree7fcfdcc62c3319ffd669b18b080d40c9c5897210 /source/components/namespace
parenta1672476f94b0c9ac84a682574aeb1eb481c484c (diff)
downloadFreeBSD-src-b37c83dbb637fc63c5ba07fe61555d4d6e29dd7c.zip
FreeBSD-src-b37c83dbb637fc63c5ba07fe61555d4d6e29dd7c.tar.gz
Import ACPICA 20131218.
Diffstat (limited to 'source/components/namespace')
-rw-r--r--source/components/namespace/nsxfeval.c16
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;
OpenPOWER on IntegriCloud