From: Zeng Zhaoming Date: Thu, 18 Nov 2010 16:46:19 +0000 (+0800) Subject: ACPI, hp-wmi: Fix memory leak in acpi query X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53c96dfdd0c0ccbba7aee84c60ce0f2aa466413f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ACPI, hp-wmi: Fix memory leak in acpi query Free acpi return memory after query. Signed-off-by: Zeng Zhaoming Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 1dac659b5e0c..9e05af9c41cb 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -172,6 +172,8 @@ static int hp_wmi_perform_query(int query, int write, u32 *buffer, bios_return = *((struct bios_return *)obj->buffer.pointer); memcpy(buffer, &bios_return.value, sizeof(bios_return.value)); + + kfree(obj); return 0; }