diff --git a/[refs] b/[refs] index a932418b77d7..eef84e336d75 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 29b67497f256399c4aa2adec27ab7ba24bba44e8 +refs/heads/master: bf3c23d171e35e6e168074a1514b0acd59cfd81a diff --git a/trunk/net/socket.c b/trunk/net/socket.c index 540013ea8620..5d879fd3d01d 100644 --- a/trunk/net/socket.c +++ b/trunk/net/socket.c @@ -1250,11 +1250,14 @@ asmlinkage long sys_socketpair(int family, int type, int protocol, goto out_release_both; fd1 = sock_alloc_fd(&newfile1); - if (unlikely(fd1 < 0)) + if (unlikely(fd1 < 0)) { + err = fd1; goto out_release_both; + } fd2 = sock_alloc_fd(&newfile2); if (unlikely(fd2 < 0)) { + err = fd2; put_filp(newfile1); put_unused_fd(fd1); goto out_release_both;