lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-585376216a829d1ddfb3e57cb50c72c23adb484f@git.kernel.org>
Date:	Thu, 24 Jan 2013 12:09:47 -0800
From:	tip-bot for Cong Ding <dinggnu@...il.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	slash@...auone-net.jp, jkosina@...e.cz, jarkko.sakkinen@...el.com,
	matt.fleming@...el.com, dinggnu@...il.com, tglx@...utronix.de
Subject: [tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c

Commit-ID:  585376216a829d1ddfb3e57cb50c72c23adb484f
Gitweb:     http://git.kernel.org/tip/585376216a829d1ddfb3e57cb50c72c23adb484f
Author:     Cong Ding <dinggnu@...il.com>
AuthorDate: Mon, 14 Jan 2013 17:13:35 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 24 Jan 2013 13:07:23 +0100

x86/boot: Fix minor fd leakage in tools/relocs.c

The opened file should be closed.

Signed-off-by: Cong Ding <dinggnu@...il.com>
Cc: Kusanagi Kouichi <slash@...auone-net.jp>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...el.com>
Cc: Jiri Kosina <jkosina@...e.cz>
Cc: Matt Fleming <matt.fleming@...el.com>
Link: http://lkml.kernel.org/r/1358183628-27784-1-git-send-email-dinggnu@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/tools/relocs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index 5a1847d..79d67bd 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;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ