diff options
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r-- | arch/cris/kernel/sys_cris.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/cris/kernel/sys_cris.c b/arch/cris/kernel/sys_cris.c index 8b9984197edc..d124066e1728 100644 --- a/arch/cris/kernel/sys_cris.c +++ b/arch/cris/kernel/sys_cris.c | |||
@@ -40,8 +40,11 @@ asmlinkage int sys_pipe(unsigned long __user * fildes) | |||
40 | error = do_pipe(fd); | 40 | error = do_pipe(fd); |
41 | unlock_kernel(); | 41 | unlock_kernel(); |
42 | if (!error) { | 42 | if (!error) { |
43 | if (copy_to_user(fildes, fd, 2*sizeof(int))) | 43 | if (copy_to_user(fildes, fd, 2*sizeof(int))) { |
44 | sys_close(fd[0]); | ||
45 | sys_close(fd[1]); | ||
44 | error = -EFAULT; | 46 | error = -EFAULT; |
47 | } | ||
45 | } | 48 | } |
46 | return error; | 49 | return error; |
47 | } | 50 | } |