From fc26bdb2fb490d04f78d59e85643b8a9a3742f1a Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 17 Jun 2021 15:56:28 +0300 Subject: [PATCH] tests: clean up in roles-test This fixes all ASan reported leaks in this test. Signed-off-by: Pekka Paalanen --- tests/roles-test.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/roles-test.c b/tests/roles-test.c index fbce0539..0021d582 100644 --- a/tests/roles-test.c +++ b/tests/roles-test.c @@ -124,6 +124,13 @@ TEST(test_role_conflict_sub_wlshell) expect_protocol_error(client, &wl_shell_interface, WL_SHELL_ERROR_ROLE); + + wl_shell_surface_destroy(shsurf); + wl_subsurface_destroy(sub); + wl_surface_destroy(child); + wl_shell_destroy(shell); + wl_subcompositor_destroy(subco); + client_destroy(client); } TEST(test_role_conflict_wlshell_sub) @@ -152,4 +159,11 @@ TEST(test_role_conflict_wlshell_sub) expect_protocol_error(client, &wl_subcompositor_interface, WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE); + + wl_shell_surface_destroy(shsurf); + wl_subsurface_destroy(sub); + wl_surface_destroy(child); + wl_shell_destroy(shell); + wl_subcompositor_destroy(subco); + client_destroy(client); }