diff options
Diffstat (limited to 'fs/coredump.c')
-rw-r--r-- | fs/coredump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/coredump.c b/fs/coredump.c index fd37facac8dc..ce47379bfa61 100644 --- a/fs/coredump.c +++ b/fs/coredump.c | |||
@@ -450,11 +450,12 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) | |||
450 | 450 | ||
451 | cp->file = files[1]; | 451 | cp->file = files[1]; |
452 | 452 | ||
453 | replace_fd(0, files[0], 0); | 453 | err = replace_fd(0, files[0], 0); |
454 | fput(files[0]); | ||
454 | /* and disallow core files too */ | 455 | /* and disallow core files too */ |
455 | current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; | 456 | current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; |
456 | 457 | ||
457 | return 0; | 458 | return err; |
458 | } | 459 | } |
459 | 460 | ||
460 | void do_coredump(siginfo_t *siginfo, struct pt_regs *regs) | 461 | void do_coredump(siginfo_t *siginfo, struct pt_regs *regs) |