From: Pekka Paalanen Date: Wed, 6 Nov 2019 10:07:23 +0000 (+0200) Subject: tests: fix test-shell init error path X-Git-Tag: upstream/9.0.0~267 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5e8188aa5925c07d001efa58ce3ac25ed5458ec;p=platform%2Fupstream%2Fweston.git 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 --- 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;