From eabecea3467a5ac3697b52d79a7d52188d6d5727 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 4 Oct 1997 18:21:15 +0000 Subject: [PATCH] While booting diskless we have no proc pointer. --- sys/kern/uipc_socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 79bfaac17838..998e3f5a0db5 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 - * $Id: uipc_socket.c,v 1.30 1997/09/02 20:05:57 bde Exp $ + * $Id: uipc_socket.c,v 1.31 1997/09/14 02:34:14 peter Exp $ */ #include @@ -360,7 +360,8 @@ sosend(so, addr, uio, top, control, flags, p) dontroute = (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 && (so->so_proto->pr_flags & PR_ATOMIC); - p->p_stats->p_ru.ru_msgsnd++; + if (p) + p->p_stats->p_ru.ru_msgsnd++; if (control) clen = control->m_len; #define snderr(errno) { error = errno; splx(s); goto release; }