Index: tcp_subr.c =================================================================== RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/netinet/tcp_subr.c,v retrieving revision 1.301 diff -u -r1.301 tcp_subr.c --- tcp_subr.c 24 Oct 2007 19:03:59 -0000 1.301 +++ tcp_subr.c 24 Nov 2007 14:11:22 -0000 @@ -2049,12 +2049,16 @@ tw = intotw(inp); if (tw != NULL) tcp_twclose(tw, 0); + else + INP_UNLOCK(inp); } else if (!(inp->inp_vflag & INP_DROPPED) && !(inp->inp_socket->so_options & SO_ACCEPTCONN)) { tp = intotcpcb(inp); - tcp_drop(tp, ECONNABORTED); - } - INP_UNLOCK(inp); + tp = tcp_drop(tp, ECONNABORTED); + if (tp != NULL) + INP_UNLOCK(inp); + } else + INP_UNLOCK(inp); } else error = ESRCH; INP_INFO_WUNLOCK(&tcbinfo);