summaryrefslogtreecommitdiffstats
path: root/source/tools/acpiexec/aeexec.c
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/tools/acpiexec/aeexec.c
parenta1672476f94b0c9ac84a682574aeb1eb481c484c (diff)
downloadFreeBSD-src-b37c83dbb637fc63c5ba07fe61555d4d6e29dd7c.zip
FreeBSD-src-b37c83dbb637fc63c5ba07fe61555d4d6e29dd7c.tar.gz
Import ACPICA 20131218.
Diffstat (limited to 'source/tools/acpiexec/aeexec.c')
-rw-r--r--source/tools/acpiexec/aeexec.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/tools/acpiexec/aeexec.c b/source/tools/acpiexec/aeexec.c
index be4d8d6..8f6d6da 100644
--- a/source/tools/acpiexec/aeexec.c
+++ b/source/tools/acpiexec/aeexec.c
@@ -344,31 +344,42 @@ ExecuteOSI (
return (Status);
}
+ Status = AE_ERROR;
+
if (ReturnValue.Length < sizeof (ACPI_OBJECT))
{
AcpiOsPrintf ("Return value from _OSI method too small, %.8X\n",
ReturnValue.Length);
- return (AE_ERROR);
+ goto ErrorExit;
}
Obj = ReturnValue.Pointer;
if (Obj->Type != ACPI_TYPE_INTEGER)
{
AcpiOsPrintf ("Invalid return type from _OSI method, %.2X\n", Obj->Type);
- return (AE_ERROR);
+ goto ErrorExit;
}
if (Obj->Integer.Value != ExpectedResult)
{
AcpiOsPrintf ("Invalid return value from _OSI, expected %.8X found %.8X\n",
ExpectedResult, (UINT32) Obj->Integer.Value);
- return (AE_ERROR);
+ goto ErrorExit;
}
+ Status = AE_OK;
+
/* Reset the OSI data */
AcpiGbl_OsiData = 0;
- return (AE_OK);
+
+ErrorExit:
+
+ /* Free a buffer created via ACPI_ALLOCATE_BUFFER */
+
+ AcpiOsFree (ReturnValue.Pointer);
+
+ return (Status);
}
OpenPOWER on IntegriCloud