mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -resend] X86: boot, close opened descriptor
@ 2013-06-19  7:53 Jiri Slaby
  2013-06-19 18:42 ` [tip:x86/boot] x86/boot: Close opened file descriptor tip-bot for Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2013-06-19  7:53 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, Jiri Slaby, H. Peter Anvin, Thomas Gleixner,
	Ingo Molnar, x86

In build, we open a file, read that but do not close it. Fix that by
sticking fclose at the right place.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: x86@kernel.org
---
 arch/x86/boot/tools/build.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c
index 94c5446..c941d6a 100644
--- a/arch/x86/boot/tools/build.c
+++ b/arch/x86/boot/tools/build.c
@@ -243,6 +243,7 @@ static void parse_zoffset(char *fname)
 	c = fread(buf, 1, sizeof(buf) - 1, file);
 	if (ferror(file))
 		die("read-error on `zoffset.h'");
+	fclose(file);
 	buf[c] = 0;
 
 	p = (char *)buf;
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-19 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19  7:53 [PATCH -resend] X86: boot, close opened descriptor Jiri Slaby
2013-06-19 18:42 ` [tip:x86/boot] x86/boot: Close opened file descriptor tip-bot for Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome