From 31f73ed392786be28bdaa8a1ba0c8110dca701ed Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Jan 2004 05:14:10 -0800 Subject: [PATCH] [PATCH] fix error case in binfmt_elf.c:load_elf_interp From: Roland McGrath Julie DeWandel noticed that in the error case where elf_map has failed, load_elf_interp will (at the out_close: label) return the `error' variable, but that will contain the result of a prior operation and not the error number from elf_map. --- fs/binfmt_elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 16884fc26255e..c535efa291013 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -349,6 +349,7 @@ static unsigned long load_elf_interp(struct elfhdr * interp_elf_ex, elf_type |= MAP_FIXED; map_addr = elf_map(interpreter, load_addr + vaddr, eppnt, elf_prot, elf_type); + error = map_addr; if (BAD_ADDR(map_addr)) goto out_close; -- 2.53.0