Skip to content

Commit e04dae8

Browse files
Alan Coxdavem330
authored andcommitted
af_unix: old_cred is surplus
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e57b8bd commit e04dae8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎net/unix/af_unix.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static int unix_release_sock(struct sock *sk, int embrion)
441441
/* ---- Socket is dead now and most probably destroyed ---- */
442442

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

486485
err = -EOPNOTSUPP;
487486
if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
@@ -503,8 +502,6 @@ static int unix_listen(struct socket *sock, int backlog)
503502
out_unlock:
504503
unix_state_unlock(sk);
505504
put_pid(old_pid);
506-
if (old_cred)
507-
put_cred(old_cred);
508505
out:
509506
return err;
510507
}

0 commit comments

Comments
 (0)