fix: preserve scanner file ownership on failure
CI / lint (pull_request) Successful in 32s
CI / sanitizers (address) (pull_request) Successful in 37s
CI / sanitizers (undefined) (pull_request) Successful in 37s
CI / fuzz-build (pull_request) Successful in 14s
CI / coverage (pull_request) Successful in 31s
CI / build-and-test (pull_request) Successful in 1m15s
CI / valgrind (pull_request) Successful in 34s
CI / lint (pull_request) Successful in 32s
CI / sanitizers (address) (pull_request) Successful in 37s
CI / sanitizers (undefined) (pull_request) Successful in 37s
CI / fuzz-build (pull_request) Successful in 14s
CI / coverage (pull_request) Successful in 31s
CI / build-and-test (pull_request) Successful in 1m15s
CI / valgrind (pull_request) Successful in 34s
This commit is contained in:
@@ -534,7 +534,6 @@ ParallelScanner* parallel_scanner_create_with_options(const char* root_directory
|
||||
void** items = array_list_to_array(batch);
|
||||
if (!items) {
|
||||
ps->failed = true;
|
||||
batch->item_destroyer = file_destroy;
|
||||
array_list_delete(batch);
|
||||
batch = NULL;
|
||||
break;
|
||||
@@ -543,11 +542,13 @@ ParallelScanner* parallel_scanner_create_with_options(const char* root_directory
|
||||
free(items);
|
||||
if (!c) {
|
||||
ps->failed = true;
|
||||
batch->item_destroyer = file_destroy;
|
||||
array_list_delete(batch);
|
||||
batch = NULL;
|
||||
break;
|
||||
}
|
||||
int batch_start = i - batch->size + 1;
|
||||
for (int j = batch_start; j <= i; j++)
|
||||
root_files->items[j] = NULL;
|
||||
batch->item_destroyer = NULL;
|
||||
array_list_delete(batch);
|
||||
batch = NULL;
|
||||
@@ -574,7 +575,6 @@ ParallelScanner* parallel_scanner_create_with_options(const char* root_directory
|
||||
array_list_delete(batch);
|
||||
}
|
||||
ps->initial_chunk = first;
|
||||
root_files->item_destroyer = NULL;
|
||||
}
|
||||
array_list_delete(root_files);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user