Properly free output file hash map
This commit is contained in:
parent
770c312f70
commit
446dc0f380
2 changed files with 9 additions and 0 deletions
|
@ -361,6 +361,8 @@ void criterion_finalize(struct criterion_test_set *set) {
|
|||
#ifndef ENABLE_VALGRIND_ERRORS
|
||||
VALGRIND_ENABLE_ERROR_REPORTING;
|
||||
#endif
|
||||
|
||||
criterion_free_output();
|
||||
}
|
||||
|
||||
static void run_tests_async(struct criterion_test_set *set,
|
||||
|
|
|
@ -44,6 +44,13 @@ int criterion_add_output(const char *provider, const char *path) {
|
|||
}
|
||||
|
||||
void criterion_free_output(void) {
|
||||
for (khint_t k = kh_begin(outputs); k != kh_end(outputs); ++k) {
|
||||
if (!kh_exist(outputs, k))
|
||||
continue;
|
||||
str_vec *vec = kh_value(outputs, k);
|
||||
kv_destroy(*vec);
|
||||
free(vec);
|
||||
}
|
||||
kh_destroy(ht_str, reporters);
|
||||
kh_destroy(ht_path, outputs);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue