summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 90023ee..9a0a25c 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -486,8 +486,11 @@ fsetown(pgid, sigiop)
* restrict FSETOWN to the current process or process
* group for maximum safety.
*/
- if (proc->p_session != curproc->p_session)
+ if (proc->p_session != curproc->p_session) {
+ PROC_UNLOCK(proc);
return (EPERM);
+ }
+ PROC_UNLOCK(proc);
pgrp = NULL;
} else /* if (pgid < 0) */ {
OpenPOWER on IntegriCloud