From e5e8188aa5925c07d001efa58ce3ac25ed5458ec Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 6 Nov 2019 12:07:23 +0200 Subject: [PATCH] tests: fix test-shell init error path This was forgetting to remove the compositor destroy listener if init failed, which would lead to use-after-free on compositor tear-down. Found by inspection. Signed-off-by: Pekka Paalanen --- tests/weston-test-desktop-shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/weston-test-desktop-shell.c b/tests/weston-test-desktop-shell.c index c88455c4..ac0ece7b 100644 --- a/tests/weston-test-desktop-shell.c +++ b/tests/weston-test-desktop-shell.c @@ -224,6 +224,7 @@ out_surface: weston_surface_destroy(dts->background_surface); out_free: + wl_list_remove(&dts->compositor_destroy_listener.link); free(dts); return -1;