diff options
-rw-r--r-- | net/unix/af_unix.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index db8d51a974b4..d146b76840b5 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -370,7 +370,7 @@ static void unix_sock_destructor(struct sock *sk) #endif } -static int unix_release_sock(struct sock *sk, int embrion) +static void unix_release_sock(struct sock *sk, int embrion) { struct unix_sock *u = unix_sk(sk); struct dentry *dentry; @@ -445,8 +445,6 @@ static int unix_release_sock(struct sock *sk, int embrion) if (unix_tot_inflight) unix_gc(); /* Garbage collect fds */ - - return 0; } static int unix_listen(struct socket *sock, int backlog) @@ -660,9 +658,10 @@ static int unix_release(struct socket *sock) if (!sk) return 0; + unix_release_sock(sk, 0); sock->sk = NULL; - return unix_release_sock(sk, 0); + return 0; } static int unix_autobind(struct socket *sock) |