tests: Fix use after free on exit

We need to unlink this before freeing it since it's being called from
weston_signal_emit_mutable.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-01-19 10:40:06 -06:00
parent 37a0544edf
commit 3759ad1538

View File

@ -618,6 +618,8 @@ handle_compositor_destroy(struct wl_listener *listener,
test = wl_container_of(listener, test, destroy_listener);
wl_list_remove(&test->destroy_listener.link);
if (test->client_source) {
weston_log_scope_printf(test->log, "Cancelling client thread...\n");
pthread_cancel(test->client_thread);