mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
Fix obscure valgrind memory leak.
This commit is contained in:
+7
-3
@@ -370,7 +370,7 @@ int main(int argc, char*argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if(dep_path) {
|
||||
if (dep_path) {
|
||||
depend_file = fopen(dep_path, "a");
|
||||
if (depend_file == 0) {
|
||||
perror(dep_path);
|
||||
@@ -389,8 +389,8 @@ int main(int argc, char*argv[])
|
||||
if (yylex()) return -1;
|
||||
destroy_lexor();
|
||||
|
||||
if(depend_file) {
|
||||
fclose(depend_file);
|
||||
if (depend_file) {
|
||||
fclose(depend_file);
|
||||
}
|
||||
|
||||
if (precomp_out) {
|
||||
@@ -398,6 +398,10 @@ int main(int argc, char*argv[])
|
||||
fclose(precomp_out);
|
||||
}
|
||||
|
||||
if (out_path) {
|
||||
fclose(out);
|
||||
}
|
||||
|
||||
/* Free the source and include directory lists. */
|
||||
for (lp = 0; lp < source_cnt; lp += 1) {
|
||||
free(source_list[lp]);
|
||||
|
||||
Reference in New Issue
Block a user