Fix obscure valgrind memory leak.

This commit is contained in:
Cary R 2009-10-08 11:39:16 -07:00 committed by Stephen Williams
parent 39f243b18e
commit 3303cc144f
1 changed files with 7 additions and 3 deletions

View File

@ -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]);