From 3303cc144fbccf7ab36d0dfc6db67c637bb79202 Mon Sep 17 00:00:00 2001 From: Cary R Date: Thu, 8 Oct 2009 11:39:16 -0700 Subject: [PATCH] Fix obscure valgrind memory leak. --- ivlpp/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ivlpp/main.c b/ivlpp/main.c index 1b3906c55..9c360fad9 100644 --- a/ivlpp/main.c +++ b/ivlpp/main.c @@ -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]);