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:
parent
a80e1cd701
commit
53c96dfdd0
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue