From: Tim Gardner Date: Mon, 31 Dec 2012 00:06:56 +0000 (+0000) Subject: ACPICA: Fix possible memory leak in dispatcher error path. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=78d025e2d057a3490f918a6e3ebe2486236505cf;p=linux-beck.git ACPICA: Fix possible memory leak in dispatcher error path. On error, delete mutex object created during method mutex creation. Reported by tim.gardner@canonical.com. Signed-off-by: Tim Gardner 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 54c968ab8144..4e5873ab4f01 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -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); }