From 33b29bbb1169a107547c63d58a25ad1449eafed6 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 14 May 2021 17:09:12 +0300 Subject: [PATCH] tests: destroy screenshooter Fixes a leak found by ASan in alpha-blending-test. 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 0x5583e534cfbe in handle_global ../../git/weston/tests/weston-test-client-helper.c:800 #8 0x7f511f34b8ed in ffi_call_unix64 (/lib/x86_64-linux-gnu/libffi.so.6+0x68ed) Signed-off-by: Pekka Paalanen --- tests/weston-test-client-helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index a49c7480..cc7ceb5b 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -1069,6 +1069,8 @@ client_destroy(struct client *client) free(client->test); } + if (client->screenshooter) + weston_screenshooter_destroy(client->screenshooter); if (client->wl_shm) wl_shm_destroy(client->wl_shm); if (client->wl_compositor)