diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sysctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 86a14a2f8b1..82b2bd64b2f 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.176 2009/07/19 12:56:19 millert Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.177 2009/07/21 14:10:14 millert Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1086,6 +1086,8 @@ fill_file2(struct kinfo_file2 *kf, struct file *fp, struct filedesc *fdp, kf->so_pcb = PTRTOINT64(so->so_pcb); kf->so_protocol = so->so_proto->pr_protocol; kf->so_family = so->so_proto->pr_domain->dom_family; + if (!so->so_pcb) + break; switch (kf->so_family) { case AF_INET: { struct inpcb *inpcb = so->so_pcb; |