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,6 +863,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) ...@@ -863,6 +863,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
/* error cleanup */ /* error cleanup */
out_free_dentry: out_free_dentry:
allow_write_access(interpreter); allow_write_access(interpreter);
if (interpreter)
fput(interpreter); fput(interpreter);
out_free_interp: out_free_interp:
if (elf_interpreter) if (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