From: Jesper Juhl Date: Wed, 19 Dec 2012 05:37:47 +0000 (+0000) Subject: ACPICA: Fix possible memory leak. X-Git-Tag: firefly_0821_release~3680^2~1099^2~11^2~46 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=227158211e8eba104a477c9a263797256811f206;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- 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];