Commit 72d4f16d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] load_elf_binary() oops fix

If we detect an error late in this function, local variable `interpreter' can
be NULL.  Don't try to fput() it in that case.
parent 67228094
......@@ -863,7 +863,8 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
/* error cleanup */
out_free_dentry:
allow_write_access(interpreter);
fput(interpreter);
if (interpreter)
fput(interpreter);
out_free_interp:
if (elf_interpreter)
kfree(elf_interpreter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment