aboutsummaryrefslogtreecommitdiff
path: root/fs/binfmt_script.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_script.c')
-rw-r--r--fs/binfmt_script.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
index 304c88544d8..4d0e0f6d327 100644
--- a/fs/binfmt_script.c
+++ b/fs/binfmt_script.c
@@ -67,7 +67,9 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
* This is done in reverse order, because of how the
* user environment and arguments are stored.
*/
- remove_arg_zero(bprm);
+ retval = remove_arg_zero(bprm);
+ if (retval)
+ return retval;
retval = copy_strings_kernel(1, &bprm->interp, bprm);
if (retval < 0) return retval;
bprm->argc++;