Cleanup if an invalid option is given.
Cleanup the temporary files and memory if iverilog is given an invalid option.
This commit is contained in:
parent
372efd8c30
commit
3ae3e34732
|
|
@ -866,6 +866,20 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
case '?':
|
||||
default:
|
||||
fclose(source_file);
|
||||
remove(source_path);
|
||||
free(source_path);
|
||||
fclose(defines_file);
|
||||
remove(defines_path);
|
||||
free(defines_path);
|
||||
fclose(iconfig_file);
|
||||
remove(iconfig_path);
|
||||
free(iconfig_path);
|
||||
remove(compiled_defines_path);
|
||||
free(compiled_defines_path);
|
||||
while( (command_filename = get_cmd_file()) ) {
|
||||
free(command_filename);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue