diff options
| author | Mohan Srinivasan <srmohan@google.com> | 2017-08-09 12:36:33 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-08-12 15:26:34 +0200 |
| commit | a0574fa45d157ea2508ab53b75d12b050ec09a37 (patch) | |
| tree | dcf3303ef58753df9dac5352f137ab3bdf23b1c2 /drivers | |
| parent | eb610d4a453f9bbb85696178df81f906e0099191 (diff) | |
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)
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/input/misc/keychord.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/misc/keychord.c b/drivers/input/misc/keychord.c index 1673e4239..fdcc14653 100644 --- a/drivers/input/misc/keychord.c +++ b/drivers/input/misc/keychord.c @@ -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; |
