]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPICA: Fix possible memory leak.
authorJesper Juhl <jj@chaosbits.net>
Wed, 19 Dec 2012 05:37:47 +0000 (05:37 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Jan 2013 11:36:18 +0000 (12:36 +0100)
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>
drivers/acpi/acpica/dsmethod.c

index 735c05996ec6ead9c45ffc09bdbb45b9dbfee125..54c968ab8144071e395cde25f540711bbcf95a0e 100644 (file)
@@ -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];