From 18c8baff8fe151ea02e00047afc369ee31939e9b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Apr 2005 15:17:19 -0700 Subject: [PATCH] [PATCH] Fix error recovery path for arch_setup_additional_pages If arch_setup_additional_pages fails, the error path will do some double-frees. This fixes it. Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds --- fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 6ae62cbf7c2e..ce9423bb2de3 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -945,7 +945,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) retval = arch_setup_additional_pages(bprm, executable_stack); if (retval < 0) { send_sig(SIGKILL, current, 0); - goto out_free_dentry; + goto out; } #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */ -- 2.39.5