]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
af_unix: old_cred is surplus
authorAlan Cox <alan@linux.intel.com>
Mon, 17 Sep 2012 00:52:41 +0000 (00:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Sep 2012 17:00:13 +0000 (13:00 -0400)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c

index 8a84ab64cafd8db2a70b58550423fb1c1d6c58f1..5b5c876c80e9b543bd7b773c1a1f45f83f696e7b 100644 (file)
@@ -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.
@@ -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)
@@ -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;
 }