diff options
-rw-r--r-- | sys/kern/kern_prot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 56f7895..a992e64 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -470,6 +470,7 @@ setpgid(td, uap) if (!inferior(targp)) { PROC_UNLOCK(targp); sx_sunlock(&proctree_lock); + error = ESRCH; goto fail; } sx_sunlock(&proctree_lock); @@ -529,6 +530,7 @@ fail: PGRPSESS_XUNLOCK(); KASSERT(newpgrp != NULL, ("setpgid failed and newpgrp is null.")); + KASSERT(error != 0, ("setpgid successfully failed?")); FREE(newpgrp, M_PGRP); mtx_unlock(&Giant); |