aboutsummaryrefslogtreecommitdiffstats
path: root/tests/proxy-test.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-09-10 11:10:15 +0300
committerSimon Ser <contact@emersion.fr>2020-01-28 20:57:52 +0000
commit96a8465e38cd5debd438d9463d54c8683751923f (patch)
tree68c06d115f00918e1d59e23abeb5e164806d7cb2 /tests/proxy-test.c
parentos: fallback for unsupported posix_fallocate (diff)
downloadwayland-96a8465e38cd5debd438d9463d54c8683751923f.tar
wayland-96a8465e38cd5debd438d9463d54c8683751923f.tar.gz
wayland-96a8465e38cd5debd438d9463d54c8683751923f.tar.bz2
wayland-96a8465e38cd5debd438d9463d54c8683751923f.tar.lz
wayland-96a8465e38cd5debd438d9463d54c8683751923f.tar.xz
wayland-96a8465e38cd5debd438d9463d54c8683751923f.tar.zst
wayland-96a8465e38cd5debd438d9463d54c8683751923f.zip
tests: fix memory leak in proxy-test
When running tests with ASan, proxy-test fails at the proxy_tag test: ==27843==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7f65a732dada in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:144 #1 0x7f65a71cb3ea in wl_display_add_protocol_logger src/wayland-server.c:1813 #2 0x557c640c0980 in proxy_tag tests/proxy-test.c:104 #3 0x557c640c1159 in run_test tests/test-runner.c:153 #4 0x557c640c1e2e in main tests/test-runner.c:337 #5 0x7f65a6ea0ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2) SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s). Destroying the logger fixes the leak. Signed-off-by: Simon Ser <contact@emersion.fr> Fixes: 493ab79bd2cd ("proxy: Add API to tag proxy objects")
Diffstat (limited to 'tests/proxy-test.c')
-rw-r--r--tests/proxy-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/proxy-test.c b/tests/proxy-test.c
index d91a73d..c09468d 100644
--- a/tests/proxy-test.c
+++ b/tests/proxy-test.c
@@ -129,6 +129,7 @@ TEST(proxy_tag)
assert(client.callback_count == 2);
+ wl_protocol_logger_destroy(logger);
wl_display_disconnect(client.display);
wl_event_loop_dispatch(server.loop, 100);