From 681db3416d07b96229f1c0d1264fe6c8b7a30f00 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 14 May 2021 17:06:27 +0300 Subject: [PATCH] tests: destroy subcompositor in alpha-blending Fixed a leak found by ASan: Direct leak of 160 byte(s) in 2 object(s) allocated from: #0 0x7f511fe11518 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9518) #1 0x7f511fc76373 in zalloc ../../git/wayland/src/wayland-private.h:232 #2 0x7f511fc76373 in proxy_create ../../git/wayland/src/wayland-client.c:422 #3 0x7f511fc79dcc in create_outgoing_proxy ../../git/wayland/src/wayland-client.c:651 #4 0x7f511fc79dcc in wl_proxy_marshal_array_constructor_versioned ../../git/wayland/src/wayland-client.c:736 #5 0x7f511fc7b17b in wl_proxy_marshal_constructor_versioned ../../git/wayland/src/wayland-client.c:873 #6 0x5583e5348f43 in wl_registry_bind /home/pq/local/include/wayland-client-protocol.h:1165 #7 0x5583e535140b in bind_to_singleton_global ../../git/weston/tests/weston-test-client-helper.c:1863 #8 0x5583e5348752 in alpha_blend_monotonic ../../git/weston/tests/alpha-blending-test.c:219 #9 0x5583e5348571 in wrapalpha_blend_monotonic ../../git/weston/tests/alpha-blending-test.c:200 #10 0x5583e53554cc in run_test ../../git/weston/tests/weston-test-runner.c:162 #11 0x5583e5355b6d in run_case ../../git/weston/tests/weston-test-runner.c:277 #12 0x5583e5355913 in for_each_test_case ../../git/weston/tests/weston-test-runner.c:235 #13 0x5583e5355df5 in testsuite_run ../../git/weston/tests/weston-test-runner.c:311 #14 0x7f511aaaf752 in client_thread_routine ../../git/weston/tests/weston-test.c:404 #15 0x7f511f88cfa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486 Signed-off-by: Pekka Paalanen --- tests/alpha-blending-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/alpha-blending-test.c b/tests/alpha-blending-test.c index 4f10d544..cf2087a6 100644 --- a/tests/alpha-blending-test.c +++ b/tests/alpha-blending-test.c @@ -256,5 +256,6 @@ TEST(alpha_blend_monotonic) wl_subsurface_destroy(sub); wl_surface_destroy(surf); buffer_destroy(buf); + wl_subcompositor_destroy(subco); client_destroy(client); }