[PATCH libevdev 1/4] test: fix memleak when using the test-uinput device

Peter Hutterer peter.hutterer at who-t.net
Wed Feb 26 19:25:51 PST 2014


The libevdev-created uinput device was never freed.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/test-common-uinput.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/test-common-uinput.c b/test/test-common-uinput.c
index 5f17fad..617b8e2 100644
--- a/test/test-common-uinput.c
+++ b/test/test-common-uinput.c
@@ -119,6 +119,7 @@ uinput_device_free(struct uinput_device *dev)
 	if (dev->dev_fd != -1)
 		close(dev->dev_fd);
 	libevdev_free(dev->d);
+	libevdev_uinput_destroy(dev->uidev);
 	free(dev);
 }
 
-- 
1.8.4.2



More information about the Input-tools mailing list