mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msi-wmi: Fix memory leak
commit 51c94491c8
upstream.
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7b74f336c5
commit
c21fcbb1bd
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue