diff options
author | Cong Ding <dinggnu@gmail.com> | 2013-01-14 12:13:35 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-27 13:24:28 -0500 |
commit | 65315d4889d403ea025081d8ca85ddf7b9c10f39 (patch) | |
tree | d478fa660da8fc7ea029254ab746901aabb4c938 /arch/x86/tools | |
parent | 949db153b6466c6f7cad5a427ecea94985927311 (diff) |
x86/boot: Fix minor fd leakage in tools/relocs.c
The opened file should be closed.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
Cc: Kusanagi Kouichi <slash@ac.auone-net.jp>
Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1358183628-27784-1-git-send-email-dinggnu@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/tools')
-rw-r--r-- | arch/x86/tools/relocs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index 5a1847d61930..79d67bd507fa 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c | |||
@@ -814,12 +814,14 @@ int main(int argc, char **argv) | |||
814 | read_relocs(fp); | 814 | read_relocs(fp); |
815 | if (show_absolute_syms) { | 815 | if (show_absolute_syms) { |
816 | print_absolute_symbols(); | 816 | print_absolute_symbols(); |
817 | return 0; | 817 | goto out; |
818 | } | 818 | } |
819 | if (show_absolute_relocs) { | 819 | if (show_absolute_relocs) { |
820 | print_absolute_relocs(); | 820 | print_absolute_relocs(); |
821 | return 0; | 821 | goto out; |
822 | } | 822 | } |
823 | emit_relocs(as_text, use_real_mode); | 823 | emit_relocs(as_text, use_real_mode); |
824 | out: | ||
825 | fclose(fp); | ||
824 | return 0; | 826 | return 0; |
825 | } | 827 | } |