diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/net/socket.c b/net/socket.c index 2c730fc718ab..06603d73c411 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1313,13 +1313,7 @@ asmlinkage long sys_socketpair(int family, int type, int protocol, | |||
1313 | goto out_fd1; | 1313 | goto out_fd1; |
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | err = audit_fd_pair(fd1, fd2); | 1316 | audit_fd_pair(fd1, fd2); |
1317 | if (err < 0) { | ||
1318 | fput(newfile1); | ||
1319 | fput(newfile2); | ||
1320 | goto out_fd; | ||
1321 | } | ||
1322 | |||
1323 | fd_install(fd1, newfile1); | 1317 | fd_install(fd1, newfile1); |
1324 | fd_install(fd2, newfile2); | 1318 | fd_install(fd2, newfile2); |
1325 | /* fd1 and fd2 may be already another descriptors. | 1319 | /* fd1 and fd2 may be already another descriptors. |
@@ -1349,7 +1343,6 @@ out_fd2: | |||
1349 | out_fd1: | 1343 | out_fd1: |
1350 | put_filp(newfile2); | 1344 | put_filp(newfile2); |
1351 | sock_release(sock2); | 1345 | sock_release(sock2); |
1352 | out_fd: | ||
1353 | put_unused_fd(fd1); | 1346 | put_unused_fd(fd1); |
1354 | put_unused_fd(fd2); | 1347 | put_unused_fd(fd2); |
1355 | goto out; | 1348 | goto out; |
@@ -2065,9 +2058,7 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args) | |||
2065 | if (copy_from_user(a, args, nargs[call])) | 2058 | if (copy_from_user(a, args, nargs[call])) |
2066 | return -EFAULT; | 2059 | return -EFAULT; |
2067 | 2060 | ||
2068 | err = audit_socketcall(nargs[call] / sizeof(unsigned long), a); | 2061 | audit_socketcall(nargs[call] / sizeof(unsigned long), a); |
2069 | if (err) | ||
2070 | return err; | ||
2071 | 2062 | ||
2072 | a0 = a[0]; | 2063 | a0 = a[0]; |
2073 | a1 = a[1]; | 2064 | a1 = a[1]; |