diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 60688960e24e..116fc437e4b9 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1412,6 +1412,8 @@ semexit_myhook(void *arg, struct proc *p) * Go through the chain of undo vectors looking for one * associated with this process. */ + if (LIST_EMPTY(&semu_list)) + return; SEMUNDO_LOCK(); LIST_FOREACH(suptr, &semu_list, un_next) { if (suptr->un_proc == p)