ACPICA: Fix possible memory leak in dispatcher error path.
authorTim Gardner <tim.gardner@canonical.com>
Mon, 31 Dec 2012 00:06:56 +0000 (00:06 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Jan 2013 11:36:21 +0000 (12:36 +0100)
On error, delete mutex object created during method mutex creation.
Reported by tim.gardner@canonical.com.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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 54c968ab8144071e395cde25f540711bbcf95a0e..4e5873ab4f01dd0cf54ee2c4d012bff26bf1d59e 100644 (file)
@@ -151,6 +151,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)
 
        status = acpi_os_create_mutex(&mutex_desc->mutex.os_mutex);
        if (ACPI_FAILURE(status)) {
+               acpi_ut_delete_object_desc(mutex_desc);
                return_ACPI_STATUS(status);
        }