diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-06-19 03:53:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-06-19 07:32:19 -0400 |
commit | 062f487190c8126209391ccb720a4ec943fd4a57 (patch) | |
tree | dcd55be3a2423cf99c00c82b6024fe700751e289 /arch/x86/boot | |
parent | 17858ca65eef148d335ffd4cfc09228a1c1cbfb5 (diff) |
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
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/tools/build.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c index 94c544650020..c941d6a8887f 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) | |||
243 | c = fread(buf, 1, sizeof(buf) - 1, file); | 243 | c = fread(buf, 1, sizeof(buf) - 1, file); |
244 | if (ferror(file)) | 244 | if (ferror(file)) |
245 | die("read-error on `zoffset.h'"); | 245 | die("read-error on `zoffset.h'"); |
246 | fclose(file); | ||
246 | buf[c] = 0; | 247 | buf[c] = 0; |
247 | 248 | ||
248 | p = (char *)buf; | 249 | p = (char *)buf; |