summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sysctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 16d1d279036..7b71ccfde26 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.328 2017/06/14 03:00:40 dlg Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.329 2017/06/20 14:11:46 gerhard Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -1327,6 +1327,7 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep,
FREF(fp);
do {
if (fp->f_count > 1 && /* 0, +1 for our FREF() */
+ FILE_IS_USABLE(fp) &&
(arg == 0 || fp->f_type == arg)) {
int af, skip = 0;
if (arg == DTYPE_SOCKET && fp->f_type == arg) {