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>
dev
Derek Foreman 3 years ago
parent 37a0544edf
commit 3759ad1538
  1. 2
      tests/weston-test.c

@ -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);

Loading…
Cancel
Save