summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_descrip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 140fb80..fe52ec1 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2104,8 +2104,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS)
PROC_LOCK(p);
xf.xf_pid = p->p_pid;
xf.xf_uid = p->p_ucred->cr_uid;
+ PROC_UNLOCK(p);
if ((fdp = p->p_fd) == NULL) {
- PROC_UNLOCK(p);
continue;
}
FILEDESC_LOCK(fdp);
@@ -2125,7 +2125,6 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS)
break;
}
FILEDESC_UNLOCK(fdp);
- PROC_UNLOCK(p);
if (error)
break;
}
OpenPOWER on IntegriCloud