summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorZeng Zhaoming <zengzm.kernel@gmail.com>2010-11-18 19:46:19 +0300
committerMatthew Garrett <mjg@redhat.com>2010-11-24 20:07:10 +0300
commit53c96dfdd0c0ccbba7aee84c60ce0f2aa466413f (patch)
treeaf21186c30d43a05a2dc65504442a6221eb1b4eb /drivers/platform
parenta80e1cd70144fe7727f2e2d838611b6b8cf8a6d5 (diff)
downloadlinux-53c96dfdd0c0ccbba7aee84c60ce0f2aa466413f.tar.xz
ACPI, hp-wmi: Fix memory leak in acpi query
Free acpi return memory after query. Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/hp-wmi.c2
1 files changed, 2 insertions, 0 deletions
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;
}