diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-12-19 09:37:47 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-10 15:36:18 +0400 |
commit | 227158211e8eba104a477c9a263797256811f206 (patch) | |
tree | 7f1d46e826c8bf69a8f192fcdf3ce0fc00571eff /drivers/acpi/acpica/dsmethod.c | |
parent | 75e444606d88b877dfb1a57b0a0ae81ed5320922 (diff) | |
download | linux-227158211e8eba104a477c9a263797256811f206.tar.xz |
ACPICA: Fix possible memory leak.
Ensure cleanup after a memory allocation failure in dsmethod.c.
Original Linux change from Jesper Juhl.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dsmethod.c')
-rw-r--r-- | drivers/acpi/acpica/dsmethod.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index 735c05996ec6..54c968ab8144 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, */ info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); + status = AE_NO_MEMORY; + goto cleanup; } info->parameters = &this_walk_state->operands[0]; |