Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18c8baff authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds
Browse files

[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: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5bec0039
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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);
	retval = arch_setup_additional_pages(bprm, executable_stack);
	if (retval < 0) {
	if (retval < 0) {
		send_sig(SIGKILL, current, 0);
		send_sig(SIGKILL, current, 0);
		goto out_free_dentry;
		goto out;
	}
	}
#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */