* [PATCH] x86: tools/relocs.c: fix resource leakage
@ 2013-01-14 17:13 Cong Ding
2013-01-24 20:09 ` [tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c tip-bot for Cong Ding
2013-01-28 0:06 ` tip-bot for Cong Ding
0 siblings, 2 replies; 3+ messages in thread
From: Cong Ding @ 2013-01-14 17:13 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Kusanagi Kouichi, Jarkko Sakkinen, Jiri Kosina, Matt Fleming,
linux-kernel
Cc: Cong Ding
the opened file should be closed.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c
2013-01-14 17:13 [PATCH] x86: tools/relocs.c: fix resource leakage Cong Ding
@ 2013-01-24 20:09 ` tip-bot for Cong Ding
2013-01-28 0:06 ` tip-bot for Cong Ding
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Cong Ding @ 2013-01-24 20:09 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, slash, jkosina, jarkko.sakkinen,
matt.fleming, dinggnu, tglx
Commit-ID: 585376216a829d1ddfb3e57cb50c72c23adb484f
Gitweb: http://git.kernel.org/tip/585376216a829d1ddfb3e57cb50c72c23adb484f
Author: Cong Ding <dinggnu@gmail.com>
AuthorDate: Mon, 14 Jan 2013 17:13:35 +0000
Committer: Ingo Molnar <mingo@kernel.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@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>
---
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c
2013-01-14 17:13 [PATCH] x86: tools/relocs.c: fix resource leakage Cong Ding
2013-01-24 20:09 ` [tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c tip-bot for Cong Ding
@ 2013-01-28 0:06 ` tip-bot for Cong Ding
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Cong Ding @ 2013-01-28 0:06 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, slash, jkosina, jarkko.sakkinen,
matt.fleming, dinggnu, tglx
Commit-ID: 65315d4889d403ea025081d8ca85ddf7b9c10f39
Gitweb: http://git.kernel.org/tip/65315d4889d403ea025081d8ca85ddf7b9c10f39
Author: Cong Ding <dinggnu@gmail.com>
AuthorDate: Mon, 14 Jan 2013 17:13:35 +0000
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Sun, 27 Jan 2013 10:24:28 -0800
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>
---
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-28 0:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 17:13 [PATCH] x86: tools/relocs.c: fix resource leakage Cong Ding
2013-01-24 20:09 ` [tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c tip-bot for Cong Ding
2013-01-28 0:06 ` tip-bot for Cong Ding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.