2010-01-07 02:22:50

by Alexander Beregalov

[permalink] [raw]
Subject: [PATCH] genksyms: close ref_file after use

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

Signed-off-by: Alexander Beregalov <[email protected]>
---
scripts/genksyms/genksyms.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index af6b836..f99115e 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -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();

--
1.6.6


2010-01-07 12:23:25

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] genksyms: close ref_file after use

On Thu, Jan 07, 2010 at 05:22:41AM +0300, Alexander Beregalov wrote:
> It is the last place when the file is read, so close it.
>
> Signed-off-by: Alexander Beregalov <[email protected]>

Applied, thanks.

Michal