diff options
author | David S. Miller <davem@davemloft.net> | 2020-05-07 07:10:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-07 07:10:13 +0200 |
commit | 3793faad7b5b730941b2efbc252d14374b60843a (patch) | |
tree | e1bea43727d87f8fd30ca169f465a3591f15d63b /net/x25 | |
parent | dsa: sja1105: dynamically allocate stats structure (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
download | linux-3793faad7b5b730941b2efbc252d14374b60843a.tar.xz linux-3793faad7b5b730941b2efbc252d14374b60843a.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts were all overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25')
-rw-r--r-- | net/x25/x25_subr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/x25/x25_subr.c b/net/x25/x25_subr.c index 8aa415a38814..0285aaa1e93c 100644 --- a/net/x25/x25_subr.c +++ b/net/x25/x25_subr.c @@ -357,6 +357,12 @@ void x25_disconnect(struct sock *sk, int reason, unsigned char cause, sk->sk_state_change(sk); sock_set_flag(sk, SOCK_DEAD); } + if (x25->neighbour) { + read_lock_bh(&x25_list_lock); + x25_neigh_put(x25->neighbour); + x25->neighbour = NULL; + read_unlock_bh(&x25_list_lock); + } } /* |