diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 67f23264cc37..b1a5a71f7476 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -438,6 +438,7 @@ in6_pcbdetach(inp) in_pcbremlists(inp); if (so) { + SOCK_LOCK(so); so->so_pcb = NULL; sotryfree(so); }