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>
This commit is contained in:
Zeng Zhaoming 2010-11-19 00:46:19 +08:00 committed by Matthew Garrett
parent a80e1cd701
commit 53c96dfdd0

View 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); bios_return = *((struct bios_return *)obj->buffer.pointer);
memcpy(buffer, &bios_return.value, sizeof(bios_return.value)); memcpy(buffer, &bios_return.value, sizeof(bios_return.value));
kfree(obj);
return 0; return 0;
} }