From b04ffa608b06d2c808818306902c0bbc1f52934b Mon Sep 17 00:00:00 2001 From: TapTap Date: Sun, 6 Sep 2026 16:21:23 +0200 Subject: [PATCH] fix: free rel path on parallel root-scan entries without -R scan_root_entry str_dup'd the entry name for every root-level file but only consumed it on the -R + --files-from path, leaking 1 string per root file in normal parallel scans (found by CI ASan/valgrind). --- src/client/scanner.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/scanner.c b/src/client/scanner.c index 4b32971..d77a4ce 100644 --- a/src/client/scanner.c +++ b/src/client/scanner.c @@ -1049,7 +1049,9 @@ static void scan_root_entry(const ScannerOptions* options, const FilterNode* roo free(rel); file_destroy(file); ps->failed = true; + return; } + free(rel); } /* Scan the root directory itself, collecting root files and subdirectories.