[PATCH libevdev 2/4] test: plug more memory leaks

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


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/test-libevdev-events.c    | 3 +++
 test/test-libevdev-has-event.c | 1 +
 2 files changed, 4 insertions(+)

diff --git a/test/test-libevdev-events.c b/test/test-libevdev-events.c
index 666b98d..398b313 100644
--- a/test/test-libevdev-events.c
+++ b/test/test-libevdev-events.c
@@ -1060,6 +1060,9 @@ START_TEST(test_ev_rep_values)
 	ck_assert_int_eq(libevdev_has_event_code(dev, EV_REP, REP_PERIOD), 1);
 	ck_assert_int_eq(libevdev_get_event_value(dev, EV_REP, REP_DELAY), 500);
 	ck_assert_int_eq(libevdev_get_event_value(dev, EV_REP, REP_PERIOD), 200);
+
+	uinput_device_free(uidev);
+	libevdev_free(dev);
 }
 END_TEST
 
diff --git a/test/test-libevdev-has-event.c b/test/test-libevdev-has-event.c
index 8beb8c4..f3c1626 100644
--- a/test/test-libevdev-has-event.c
+++ b/test/test-libevdev-has-event.c
@@ -455,6 +455,7 @@ START_TEST(test_invalid_mt_device)
 	ck_assert(libevdev_get_event_value(dev, EV_ABS, ABS_MT_SLOT) == 1);
 
 	uinput_device_free(uidev);
+	libevdev_free(dev);
 } END_TEST
 
 
-- 
1.8.4.2



More information about the Input-tools mailing list