Free acpi return memory after query.

Signed-off-by: Zeng Zhaoming <[email protected]>
---
 drivers/platform/x86/hp-wmi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 drivers/platform/x86/hp-wmi.c

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
old mode 100644
new mode 100755
index 1dac659..9e05af9
--- 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;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to