linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] fs/binfmt_elf.c: fix a wrong free
@ 2008-05-03 12:46 WANG Cong
  2008-05-03 13:26 ` Pekka J Enberg
  0 siblings, 1 reply; 5+ messages in thread
From: WANG Cong @ 2008-05-03 12:46 UTC (permalink / raw)
  To: LKML; +Cc: Eric Youngdale, viro, linux-fsdevel, Andrew Morton


Fix a wrong free in fs/binfmt_elf.c::elf_core_dump().

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Eric Youngdale <ericy@cais.com>

---
 fs/binfmt_elf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index b25707f..43254e3 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2032,10 +2032,10 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
 
 end_coredump:
 	set_fs(fs);
+	free_note_info(&info);
 
 cleanup:
 	kfree(elf);
-	free_note_info(&info);
 	return has_dumped;
 }
 
-- 
1.5.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-04 14:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-03 12:46 [Patch] fs/binfmt_elf.c: fix a wrong free WANG Cong
2008-05-03 13:26 ` Pekka J Enberg
2008-05-03 14:39   ` WANG Cong
2008-05-04 10:39     ` Pekka Enberg
2008-05-04 14:30       ` WANG Cong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).