diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 1999-02-15 01:18:25 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 1999-02-15 01:18:25 +0000 |
commit | e2fee34981418a3dc8c050c6ec1f3d9151792dca (patch) | |
tree | 4e71d0213df2989b6daddb45dcdad8c31c22bf7c | |
parent | ece5a689dfdf3b834c696f23bac77772ab25a2cf (diff) |
Notes
-rw-r--r-- | sys/kern/uipc_usrreq.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 93f61649641e..e498a4d698fa 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94 - * $Id: uipc_usrreq.c,v 1.36 1998/07/15 02:32:12 bde Exp $ + * $Id: uipc_usrreq.c,v 1.37 1998/10/25 17:44:51 phk Exp $ */ #include <sys/param.h> @@ -1115,7 +1115,12 @@ unp_gc() * for each FD on our hit list, do the following two things */ for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp) - sorflush((struct socket *)(*fpp)->f_data); + struct file *tfp = *fpp; + if (tfp->f_type == DTYPE_SOCKET && tfp->f_data != NULL) + sorflush((struct socket *)(tfp->f_data)); + } + + for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp) closef(*fpp, (struct proc *) NULL); free((caddr_t)extra_ref, M_FILE); |