Merge pull request #4434 from mikesinouye/asan

Fix memory leak in verific file parsing.
This commit is contained in:
Miodrag Milanović 2024-06-08 11:48:05 +02:00 committed by GitHub
commit 078c14f055
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -3510,6 +3510,12 @@ struct VerificPass : public Pass {
verific_error_msg.clear();
log_cmd_error("Reading Verilog/SystemVerilog sources failed.\n");
}
char* fn;
int i = 0;
FOREACH_ARRAY_ITEM(&file_names, i, fn) {
free(fn);
}
set_modules_to_blackbox(map, work, flag_lib);
verific_import_pending = true;
goto check_error;