aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c
index bbc80780f45a..b807f360e02c 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1418,7 +1418,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int _
1418 newfd = sock_alloc_fd(&newfile); 1418 newfd = sock_alloc_fd(&newfile);
1419 if (unlikely(newfd < 0)) { 1419 if (unlikely(newfd < 0)) {
1420 err = newfd; 1420 err = newfd;
1421 goto out_release; 1421 sock_release(newsock);
1422 goto out_put;
1422 } 1423 }
1423 1424
1424 err = sock_attach_fd(newsock, newfile); 1425 err = sock_attach_fd(newsock, newfile);
@@ -1457,8 +1458,6 @@ out:
1457out_fd: 1458out_fd:
1458 fput(newfile); 1459 fput(newfile);
1459 put_unused_fd(newfd); 1460 put_unused_fd(newfd);
1460out_release:
1461 sock_release(newsock);
1462 goto out_put; 1461 goto out_put;
1463} 1462}
1464 1463