Commit 20014431 authored by Peter Hutterer's avatar Peter Hutterer

test: plug a couple of memory leaks

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent e49a9888
......@@ -84,6 +84,8 @@ START_TEST(log_handler_invoked)
ck_assert_int_gt(log_handler_called, 0);
log_handler_called = 0;
libinput_destroy(li);
}
END_TEST
......@@ -100,6 +102,8 @@ START_TEST(log_userdata_NULL)
ck_assert_int_gt(log_handler_called, 0);
log_handler_called = 0;
libinput_destroy(li);
}
END_TEST
......@@ -116,6 +120,8 @@ START_TEST(log_userdata)
ck_assert_int_gt(log_handler_called, 0);
log_handler_called = 0;
libinput_destroy(li);
}
END_TEST
......@@ -133,6 +139,8 @@ START_TEST(log_handler_NULL)
ck_assert_int_eq(log_handler_called, 0);
log_handler_called = 0;
libinput_log_set_handler(simple_log_handler, NULL);
libinput_destroy(li);
}
END_TEST
......@@ -154,6 +162,8 @@ START_TEST(log_priority)
ck_assert_int_gt(log_handler_called, 0);
log_handler_called = 0;
libinput_destroy(li);
}
END_TEST
......
......@@ -76,8 +76,10 @@ START_TEST(touch_abs_transform)
libinput_dispatch(libinput);
while ((ev = libinput_get_event(libinput))) {
if (libinput_event_get_type(ev) != LIBINPUT_EVENT_TOUCH_DOWN)
if (libinput_event_get_type(ev) != LIBINPUT_EVENT_TOUCH_DOWN) {
libinput_event_destroy(ev);
continue;
}
tev = libinput_event_get_touch_event(ev);
fx = libinput_event_touch_get_x_transformed(tev, 1920);
......@@ -86,6 +88,8 @@ START_TEST(touch_abs_transform)
ck_assert_int_eq(li_fixed_to_int(fy), 719);
tested = true;
libinput_event_destroy(ev);
}
ck_assert(tested);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment