mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 11:58:04 +02:00
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:
parent
f589f4968f
commit
09e97a5231
2 changed files with 2 additions and 0 deletions
|
|
@ -940,6 +940,7 @@ test_attr_parse(struct litest_device *dev,
|
||||||
ck_assert(func(q, which, data));
|
ck_assert(func(q, which, data));
|
||||||
ck_assert(quirks_has_quirk(q, which));
|
ck_assert(quirks_has_quirk(q, which));
|
||||||
quirks_unref(q);
|
quirks_unref(q);
|
||||||
|
quirks_context_unref(ctx);
|
||||||
result = true;
|
result = true;
|
||||||
} else {
|
} else {
|
||||||
result = false;
|
result = false;
|
||||||
|
|
|
||||||
|
|
@ -1093,6 +1093,7 @@ START_TEST(proximity_out_clear_buttons)
|
||||||
if (libinput_event_get_type(event) ==
|
if (libinput_event_get_type(event) ==
|
||||||
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
|
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
|
||||||
have_proximity = true;
|
have_proximity = true;
|
||||||
|
libinput_event_destroy(event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue