Fix memory leak in verific file parsing.

Signed-off-by: Mike Inouye <mikeinouye@google.com>
This commit is contained in:
Mike Inouye 2024-06-07 22:51:28 +00:00
parent 54d5e56745
commit b0ab1cf8c3
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;