Skip to contentSkip to conversation

ACPI, hp-wmi: Fix memory leak in acpi query

PATCH Applied Zeng Zhaoming 2 participants 2 messages Nov 18, 2010 – Nov 24, 2010 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI, hp-wmi: Fix memory leak in acpi query

Free acpi return memory after query.

---
 drivers/platform/x86/hp-wmi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 drivers/platform/x86/hp-wmi.c
drivers/platform/x86/hp-wmi.c +2 -0
old mode 100644
new mode 100755
index 1dac659..9e05af9
@@ -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;
 }
 
Signature · 1 line
1.7.0.4