Commit 22715821 authored by Jesper Juhl's avatar Jesper Juhl Committed by Rafael J. Wysocki

ACPICA: Fix possible memory leak.

Ensure cleanup after a memory allocation failure in dsmethod.c.
Original Linux change from Jesper Juhl.
Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 75e44460
...@@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, ...@@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
*/ */
info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
if (!info) { if (!info) {
return_ACPI_STATUS(AE_NO_MEMORY); status = AE_NO_MEMORY;
goto cleanup;
} }
info->parameters = &this_walk_state->operands[0]; info->parameters = &this_walk_state->operands[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment