Skip to content

Commit

Permalink
ACPI, hp-wmi: Fix memory leak in acpi query
Browse files Browse the repository at this point in the history
Free acpi return memory after query.

Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Zeng Zhaoming authored and Matthew Garrett committed Nov 24, 2010
1 parent a80e1cd commit 53c96df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 53c96df

Please sign in to comment.