diff options
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r-- | net/ipv6/anycast.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 2f4f584d796d..757a810d8f15 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c @@ -189,6 +189,9 @@ void ipv6_sock_ac_close(struct sock *sk) struct net *net = sock_net(sk); int prev_index; + if (!np->ipv6_ac_list) + return; + write_lock_bh(&ipv6_sk_ac_lock); pac = np->ipv6_ac_list; np->ipv6_ac_list = NULL; |