diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-17 12:19:58 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-17 12:19:58 +0200 |
commit | 48c5732f4ac0621a2fdde006d55a6621a47a728f (patch) | |
tree | b43f467850edc019cc8537bbc2495c8740b4c251 /net | |
parent | x25: Use sock_orphan() instead of open-coded (and buggy) variant. (diff) | |
download | linux-48c5732f4ac0621a2fdde006d55a6621a47a728f.tar.xz linux-48c5732f4ac0621a2fdde006d55a6621a47a728f.zip |
netrom: Kill spurious NULL'ing of sk->sk_socket.
In nr_release(), one code path calls sock_orphan() which
will NULL out sk->sk_socket already.
In the other case, handling states other than NR_STATE_{0,1,2,3},
seems to not be possible other than due to bugs. Even for an
uninitialized nr->state value, that would be zero or NR_STATE_0.
It might be wise to stick a WARN_ON() here.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netrom/af_netrom.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 58779624cdbe..74884f4a6255 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -536,11 +536,9 @@ static int nr_release(struct socket *sock) sk->sk_state_change(sk); sock_orphan(sk); sock_set_flag(sk, SOCK_DESTROY); - sk->sk_socket = NULL; break; default: - sk->sk_socket = NULL; break; } |