diff options
-rw-r--r-- | sys/kern/kern_descrip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 070fac7..d68854e 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2392,7 +2392,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) if (fdp == NULL) continue; /* overestimates sparse tables. */ - n += fdp->fd_lastfile; + if (fdp->fd_lastfile > 0) + n += fdp->fd_lastfile; fddrop(fdp); } sx_sunlock(&allproc_lock); |