test: Clean up memory leaks

A few leaks in the test code were found when running linput-test-suite
with the -fsanitize=address option enabled. Clean up these leaks so that
we can more clearly see real issues.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Jason Gerecke 2019-04-11 13:17:02 +10:00 committed by Peter Hutterer
parent f589f4968f
commit 09e97a5231
2 changed files with 2 additions and 0 deletions

View file

@ -940,6 +940,7 @@ test_attr_parse(struct litest_device *dev,
ck_assert(func(q, which, data));
ck_assert(quirks_has_quirk(q, which));
quirks_unref(q);
quirks_context_unref(ctx);
result = true;
} else {
result = false;

View file

@ -1093,6 +1093,7 @@ START_TEST(proximity_out_clear_buttons)
if (libinput_event_get_type(event) ==
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
have_proximity = true;
libinput_event_destroy(event);
break;
}