Skip to content

Commit

Permalink
af_unix: old_cred is surplus
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Alan Cox authored and davem330 committed Sep 17, 2012
1 parent e57b8bd commit e04dae8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ static int unix_release_sock(struct sock *sk, int embrion)
/* ---- Socket is dead now and most probably destroyed ---- */

/*
* Fixme: BSD difference: In BSD all sockets connected to use get
* Fixme: BSD difference: In BSD all sockets connected to us get
* ECONNRESET and we die on the spot. In Linux we behave
* like files and pipes do and wait for the last
* dereference.
Expand Down Expand Up @@ -481,7 +481,6 @@ static int unix_listen(struct socket *sock, int backlog)
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
struct pid *old_pid = NULL;
const struct cred *old_cred = NULL;

err = -EOPNOTSUPP;
if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
Expand All @@ -503,8 +502,6 @@ static int unix_listen(struct socket *sock, int backlog)
out_unlock:
unix_state_unlock(sk);
put_pid(old_pid);
if (old_cred)
put_cred(old_cred);
out:
return err;
}
Expand Down

0 comments on commit e04dae8

Please sign in to comment.