From 2516e3308da3c9388a9ac2ceaf7b08690d68e203 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 15 Jun 2021 16:22:34 +0300 Subject: [PATCH] compositor: fix leaking log_scopes Found by ASan: Direct leak of 30 byte(s) in 1 object(s) allocated from: #0 0x7f4dcf029810 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x7f4dcefd2143 in handle_option ../../git/weston/shared/option-parser.c:56 #2 0x7f4dcefd2473 in long_option ../../git/weston/shared/option-parser.c:84 #3 0x7f4dcefd2bb6 in parse_options ../../git/weston/shared/option-parser.c:175 #4 0x7f4dcefc7b0d in wet_main ../../git/weston/compositor/main.c:3229 #5 0x5593dfa38ffd in execute_compositor ../../git/weston/tests/weston-test-fixture-compositor.c:432 #6 0x5593dfa3ca69 in weston_test_harness_execute_as_client ../../git/weston/tests/weston-test-runner.c:528 #7 0x5593dfa2e511 in fixture_setup ../../git/weston/tests/ivi-shell-app-test.c:139 #8 0x5593dfa2e596 in fixture_setup_run_ ../../git/weston/tests/ivi-shell-app-test.c:141 #9 0x5593dfa3d01e in main ../../git/weston/tests/weston-test-runner.c:661 #10 0x7f4dcec2d09a in __libc_start_main ../csu/libc-start.c:308 #11 0x5593dfa2d769 in _start (/home/pq/build/weston-meson/tests/test-ivi-shell-app+0xd769) when running ASAN_OPTIONS=fast_unwind_on_malloc=0,malloc_context_size=50 \ LSAN_OPTIONS=suppressions=/home/pq/git/weston/.gitlab-ci/leak-sanitizer.supp \ ./tests/test-ivi-shell-app Signed-off-by: Pekka Paalanen --- compositor/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/compositor/main.c b/compositor/main.c index 550f8ceb..de091bc9 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3493,6 +3493,7 @@ out_display: free(socket_name); free(option_modules); free(log); + free(log_scopes); free(modules); return ret;