Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72a8dae2 authored by Mohan Srinivasan's avatar Mohan Srinivasan
Browse files

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: default avatarMohan Srinivasan <srmohan@google.com>
parent 59584701
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;