diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 06743d15c7f7..65f85d5c63d7 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1528,9 +1528,7 @@ fdcheckstd(td) if (fdp->fd_ofiles[i] != NULL) continue; if (devnull < 0) { - FILEDESC_LOCK(fdp); error = falloc(td, &fp, &fd); - FILEDESC_UNLOCK(fdp); if (error != 0) break; NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, "/dev/null",