]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/x25/x25_subr.c
handle the group_source_req options directly
[mirror_ubuntu-jammy-kernel.git] / net / x25 / x25_subr.c
index 8aa415a38814b1545e73b89ef128aa4e4276885f..0285aaa1e93c17233748d38eef6d8b5c6059b67a 100644 (file)
@@ -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);
+       }
 }
 
 /*