Skip to content
Snippets Groups Projects
Commit a01299a5 authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

tests: fix all leaks in touch-test


Fixes all ASan reported leaks.

The manual touch release is slightly awkward as we need to open-code a
part of input_destroy() to avoid double-freeing pointer->wl_touch.

Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent 56a8d69b
No related branches found
No related tags found
2 merge requests!905color-lcms: Introduction and implementation of LCMS plugin,!647More leak fixes in tests, reported by ASan
......@@ -89,6 +89,8 @@ TEST(touch_events)
assert(timespec_eq(&touch->up_time_timespec, &t3));
input_timestamps_destroy(input_ts);
client_destroy(client);
}
TEST(touch_timestamps_stop_after_input_timestamps_object_is_destroyed)
......@@ -107,6 +109,8 @@ TEST(touch_timestamps_stop_after_input_timestamps_object_is_destroyed)
send_touch(client, &t2, WL_TOUCH_UP);
assert(touch->up_time_msec == timespec_to_msec(&t2));
assert(timespec_is_zero(&touch->up_time_timespec));
client_destroy(client);
}
TEST(touch_timestamps_stop_after_client_releases_wl_touch)
......@@ -132,4 +136,8 @@ TEST(touch_timestamps_stop_after_client_releases_wl_touch)
assert(timespec_eq(&touch->input_timestamp, &t_other));
input_timestamps_destroy(input_ts);
free(client->input->touch);
client->input->touch = NULL;
client_destroy(client);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment