Skip to content

Commit

Permalink
msi-wmi: Fix memory leak
Browse files Browse the repository at this point in the history
Fix memory leak - don't forget to kfree ACPI object when returning from
msi_wmi_notify() after suppressing key event.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Acked-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
Maxim Mikityanskiy authored and Matthew Garrett committed Feb 24, 2013
1 parent 03696e5 commit 51c9449
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/platform/x86/msi-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void msi_wmi_notify(u32 value, void *context)
pr_debug("Suppressed key event 0x%X - "
"Last press was %lld us ago\n",
key->code, ktime_to_us(diff));
return;
goto msi_wmi_notify_exit;
}
last_pressed[key->code - SCANCODE_BASE] = cur;

Expand All @@ -195,6 +195,8 @@ static void msi_wmi_notify(u32 value, void *context)
pr_info("Unknown key pressed - %x\n", eventcode);
} else
pr_info("Unknown event received\n");

msi_wmi_notify_exit:
kfree(response.pointer);
}

Expand Down

0 comments on commit 51c9449

Please sign in to comment.