diff options
author | Cong Ding <dinggnu@gmail.com> | 2013-01-14 21:13:35 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-27 22:24:28 +0400 |
commit | 65315d4889d403ea025081d8ca85ddf7b9c10f39 (patch) | |
tree | d478fa660da8fc7ea029254ab746901aabb4c938 /arch/x86/tools | |
parent | 949db153b6466c6f7cad5a427ecea94985927311 (diff) | |
download | linux-65315d4889d403ea025081d8ca85ddf7b9c10f39.tar.xz |
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) read_relocs(fp); if (show_absolute_syms) { print_absolute_symbols(); - return 0; + goto out; } if (show_absolute_relocs) { print_absolute_relocs(); - return 0; + goto out; } emit_relocs(as_text, use_real_mode); +out: + fclose(fp); return 0; } |