diff options
Diffstat (limited to 'arch/m32r/kernel')
| -rw-r--r-- | arch/m32r/kernel/sys_m32r.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index 6d7a80fdad48..319c79720b8a 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c | |||
| @@ -90,8 +90,11 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2, | |||
| 90 | 90 | ||
| 91 | error = do_pipe(fd); | 91 | error = do_pipe(fd); |
| 92 | if (!error) { | 92 | if (!error) { |
| 93 | if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) | 93 | if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) { |
| 94 | sys_close(fd[0]); | ||
| 95 | sys_close(fd[1]); | ||
| 94 | error = -EFAULT; | 96 | error = -EFAULT; |
| 97 | } | ||
| 95 | } | 98 | } |
| 96 | return error; | 99 | return error; |
| 97 | } | 100 | } |
