summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2012-10-23 09:33:10 -0700
committerRobert Moore <Robert.Moore@intel.com>2012-10-23 09:33:10 -0700
commit05432f7a2f00f7f6271e91747bfbbf5a4d7bca46 (patch)
tree2c53521dd47661303a7ce884c3699d678240976a
parent27d3c34f82ab3fd5a1ae9d4fc40c8712597854c7 (diff)
downloadacpica-05432f7a2f00f7f6271e91747bfbbf5a4d7bca46.tar.gz
Fix possible memory leak.
Ensure cleanup after a memory allocation failure in dsmethod.c. Original Linux change from Jesper Juhl.
-rw-r--r--source/components/dispatcher/dsmethod.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c
index bd8e3b810..c892254b4 100644
--- a/source/components/dispatcher/dsmethod.c
+++ b/source/components/dispatcher/dsmethod.c
@@ -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];