ACPI, hp-wmi: Fix memory leak in acpi query
authorZeng Zhaoming <zengzm.kernel@gmail.com>
Thu, 18 Nov 2010 16:46:19 +0000 (00:46 +0800)
committerMatthew Garrett <mjg@redhat.com>
Wed, 24 Nov 2010 17:07:10 +0000 (12:07 -0500)
Free acpi return memory after query.

Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/hp-wmi.c

index 1dac659b5e0c84e7bc3ccefea144d6a3dc88993c..9e05af9c41cbcd129bc3912c4bff2b6b8ad61b96 100644 (file)
@@ -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;
 }