Ian Dowse ddb7d629f1 Sockets passed into uipc_abort() have been allocated by sonewconn()
but never accept'ed, so they must be destroyed. Originally, unp_drop()
detected this situation by checking if so->so_head is non-NULL.
However, since revision 1.54 of uipc_socket.c (Feb 1999), so->so_head
is set to NULL before calling soabort(), so any unix-domain sockets
waiting to be accept'ed are leaked if the server socket is closed.

Resolve this by moving the socket destruction code into uipc_abort()
itself, and making it unconditional (the other caller of unp_drop()
never needs the socket to be destroyed). Use unp_detach() to avoid
the original code duplication when destroying the socket.

PR:		kern/17895
Reviewed by:	dwmalone (an earlier version of the patch)
MFC after:	1 week
2002-02-25 00:03:34 +00:00
..
2001-12-16 17:21:16 +00:00
2002-02-07 20:58:47 +00:00
2002-02-07 20:58:47 +00:00
2001-09-12 08:38:13 +00:00
2002-02-20 21:25:44 +00:00
2001-09-12 08:38:13 +00:00
2001-09-12 08:38:13 +00:00
2002-02-07 20:58:47 +00:00
2001-11-04 11:56:22 +00:00
2001-09-12 08:38:13 +00:00
2002-02-23 01:42:13 +00:00
2002-02-20 21:25:44 +00:00
2002-02-10 22:07:41 +00:00
2001-12-29 07:13:47 +00:00
2001-12-29 07:13:47 +00:00
2001-09-12 08:38:13 +00:00
2001-12-11 10:21:26 +00:00
2002-02-23 11:12:57 +00:00
2002-02-23 11:12:57 +00:00
2001-06-11 12:39:29 +00:00
2002-02-23 11:12:57 +00:00