Skip to contentSkip to conversation

genksyms: close ref_file after use

PATCH Applied Alexander Beregalov 2 participants 2 messages Jan 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genksyms: close ref_file after use

It is the last place when the file is read, so close it.

---
 scripts/genksyms/genksyms.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
scripts/genksyms/genksyms.c +3 -1
index af6b836..f99115e 100644
@@ -758,8 +758,10 @@ int main(int argc, char **argv)
 		/* setlinebuf(debugfile); */
 	}
 
-	if (flag_reference)
+	if (flag_reference) {
 		read_reference(ref_file);
+		fclose(ref_file);
+	}
 
 	yyparse();
 
Signature · 1 line
1.6.6