From: tip-bot for Jiri Slaby <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
tglx@linutronix.de, jslaby@suse.cz
Subject: [tip:x86/boot] x86/boot: Close opened file descriptor
Date: Wed, 19 Jun 2013 11:42:02 -0700 [thread overview]
Message-ID: <tip-062f487190c8126209391ccb720a4ec943fd4a57@git.kernel.org> (raw)
In-Reply-To: <1371628383-11216-1-git-send-email-jslaby@suse.cz>
Commit-ID: 062f487190c8126209391ccb720a4ec943fd4a57
Gitweb: http://git.kernel.org/tip/062f487190c8126209391ccb720a4ec943fd4a57
Author: Jiri Slaby <jslaby@suse.cz>
AuthorDate: Wed, 19 Jun 2013 09:53:03 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 19 Jun 2013 13:32:19 +0200
x86/boot: Close opened file descriptor
During 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>
Link: http://lkml.kernel.org/r/1371628383-11216-1-git-send-email-jslaby@suse.cz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.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;
prev parent reply other threads:[~2013-06-19 18:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 7:53 [PATCH -resend] X86: boot, close opened descriptor Jiri Slaby
2013-06-19 18:42 ` tip-bot for Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-062f487190c8126209391ccb720a4ec943fd4a57@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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