From 5c686b0655b39608f5f873691f95319afc7adbce Mon Sep 17 00:00:00 2001 From: TapTap Date: Mon, 20 Jul 2026 14:28:42 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20address=20PR=20review=20=E2=80=94=20doc?= =?UTF-8?q?=20accuracy,=20clang-tidy=20info,=20config=20leak=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review findings addressed: Critical: - cmake-expert.md: replace commented-out sanitizer lines with actual SANITIZER cache variable block, fix ENABLE_ASAN/TSAN/UBSAN pattern - integrator.md: update YAML example to v7, use -DSANITIZER= instead of raw flags, add symlink + LSAN suppression steps Warnings: - ci.yaml: rename clang-tidy step to 'informational, non-blocking', add ::warning:: workflow command for visibility - client_cli.c: add goto cleanup pattern to free config on error paths (skip for multithreaded path where pipeline_context_sender_destroy already owns config) Suggestions: - test-writer.md: clarify conftest.py is at tests/conftest.py - .lsan-suppressions.txt: remove config_create suppression (leak fixed) --- src/client/client_cli.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/client_cli.c b/src/client/client_cli.c index 2b5d979..6a4399f 100644 --- a/src/client/client_cli.c +++ b/src/client/client_cli.c @@ -74,6 +74,7 @@ int main(int argc, char* argv[]) { Config* config = config_create(str_dup(PROTOCOL_VERSION), NULL, NULL, save_to_disk, false, false, false, false, 5, false, 0); int exit_code = 0; + bool config_owned_by_pipeline = false; int positional_args[2]; int positional_count = 0; @@ -291,12 +292,15 @@ int main(int argc, char* argv[]) { tls_global_init(); } - if (config->use_multithreading) + if (config->use_multithreading) { + config_owned_by_pipeline = true; exit_code = send_files_multithreaded(config); - else + } else { exit_code = send_files(config); + } cleanup: - config_delete(config); + if (!config_owned_by_pipeline) + config_delete(config); return exit_code; }