From 7bce28b5433bdbf66dc6c86fb9e129cec354ba89 Mon Sep 17 00:00:00 2001 From: Guillaume Champagne Date: Sun, 2 Feb 2020 19:59:52 -0500 Subject: [PATCH] tests: release resources on compositor destruction Releases touch devices and seat if they were allocated, clean up the layers and free the weston_test structure. Signed-off-by: Guillaume Champagne --- tests/weston-test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/weston-test.c b/tests/weston-test.c index e438e823..e3a0cb66 100644 --- a/tests/weston-test.c +++ b/tests/weston-test.c @@ -794,8 +794,14 @@ handle_compositor_destroy(struct wl_listener *listener, client_thread_join(test); } + if (test->is_seat_initialized) + test_seat_release(test); + + wl_list_remove(&test->layer.view_list.link); + wl_list_remove(&test->layer.link); + weston_log_scope_destroy(test->log); - test->log = NULL; + free(test); } WL_EXPORT int