diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-02-25 00:03:34 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-02-25 00:03:34 +0000 |
commit | 293f2d1cfe253c3913e4db497083c438f511d981 (patch) | |
tree | d484aa4d9ae8894e05fe2e3f7bdb2d64df42d9bc /lib/libutil/_secure_path.c | |
parent | aaf850a0ef6fff53318bd1492df67d5d014bdcb5 (diff) | |
download | FreeBSD-src-293f2d1cfe253c3913e4db497083c438f511d981.zip FreeBSD-src-293f2d1cfe253c3913e4db497083c438f511d981.tar.gz |
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
Diffstat (limited to 'lib/libutil/_secure_path.c')
0 files changed, 0 insertions, 0 deletions