login
Header Space

 
 

[Patch] fs/binfmt_elf.c: fix a wrong free

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: LKML <linux-kernel@...>
Cc: Eric Youngdale <ericy@...>, <viro@...>, <linux-fsdevel@...>, Andrew Morton <akpm@...>
Date: Saturday, May 3, 2008 - 8:46 am

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch] fs/binfmt_elf.c: fix a wrong free, WANG Cong, (Sat May 3, 8:46 am)
Re: [Patch] fs/binfmt_elf.c: fix a wrong free, Pekka J Enberg, (Sat May 3, 9:26 am)
Re: [Patch] fs/binfmt_elf.c: fix a wrong free, WANG Cong, (Sat May 3, 10:39 am)
Re: [Patch] fs/binfmt_elf.c: fix a wrong free, Pekka Enberg, (Sun May 4, 6:39 am)
Re: [Patch] fs/binfmt_elf.c: fix a wrong free, WANG Cong, (Sun May 4, 10:30 am)
speck-geostationary