fix: address PR 212 review issues
CI / lint (pull_request) Successful in 30s
CI / sanitizers (address) (pull_request) Successful in 38s
CI / sanitizers (undefined) (pull_request) Successful in 38s
CI / fuzz-build (pull_request) Successful in 15s
CI / coverage (pull_request) Successful in 32s
CI / build-and-test (pull_request) Successful in 1m15s
CI / valgrind (pull_request) Successful in 33s

This commit is contained in:
2026-08-15 12:48:31 +02:00
parent 298976aefb
commit 09454413d4
5 changed files with 101 additions and 47 deletions
+5
View File
@@ -363,6 +363,8 @@ static int parallel_worker_thread(void* arg) {
cnd_broadcast(&wa->ps->result_not_empty);
cnd_broadcast(&wa->ps->result_not_full);
mtx_unlock(&wa->ps->result_mutex);
for (int j = i; j < wa->dir_count; j++)
free(wa->dirs[j]);
break;
}
Chunk* chunk;
@@ -588,6 +590,7 @@ ParallelScanner* parallel_scanner_create_with_options(const char* root_directory
ParallelWorkerArg* wa = calloc(1, sizeof(ParallelWorkerArg));
if (!wa) {
ps->failed = true;
ps->expected_threads = ps->created_threads;
break;
}
wa->ps = ps;
@@ -595,6 +598,7 @@ ParallelScanner* parallel_scanner_create_with_options(const char* root_directory
if (!wa->dirs) {
free(wa);
ps->failed = true;
ps->expected_threads = ps->created_threads;
break;
}
bool dup_ok = true;
@@ -609,6 +613,7 @@ ParallelScanner* parallel_scanner_create_with_options(const char* root_directory
free(wa->dirs);
free(wa);
ps->failed = true;
ps->expected_threads = ps->created_threads;
break;
}
wa->dir_count = count;