ANDROID: keychord: Fix for a memory leak in keychord.
Fixes a steady memory leak in the keychord release code. A close of the keychord device will leak 1 keychord structure. Easily reproducible by a simple program that does an open()->write()->close() of the keychord device. Bug: 64483974 Change-Id: I1fa402c666cffb00b8cfd6379d9fe47a0989152c Signed-off-by: Mohan Srinivasan <srmohan@google.com> (cherry picked from commit 72a8dae2c25d0277e48672ee85b70236268add01)
This commit is contained in:
parent
462acca281
commit
60366263e6
1 changed files with 1 additions and 0 deletions
|
@ -432,6 +432,7 @@ static int keychord_release(struct inode *inode, struct file *file)
|
|||
|
||||
if (kdev->registered)
|
||||
input_unregister_handler(&kdev->input_handler);
|
||||
kfree(kdev->keychords);
|
||||
kfree(kdev);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue