From: Lin Ming Date: Fri, 4 Jul 2008 02:51:41 +0000 (+0800) Subject: ACPICA: Fix possible memory leak in Unload() operator X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3ff268a0149fce8835f6d48ab481d5e3321e0f7;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ACPICA: Fix possible memory leak in Unload() operator The DdbHandle returned by Load() does not have its reference count decremented during unload, leading to a memory leak. Lin Ming. Signed-off-by: Lin Ming Signed-off-by: Bob Moore Signed-off-by: Andi Kleen --- diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 2a32c843cb4..8892b9824fa 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -479,5 +479,8 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) acpi_tb_set_table_loaded_flag(table_index, FALSE); + /* Table unloaded, remove a reference to the ddb_handle object */ + + acpi_ut_remove_reference(ddb_handle); return_ACPI_STATUS(AE_OK); }