fdhold can return NULL, so add the one remaining missing check for this

condition.

Reviewed by:    attilio
MFC after:      1 week
This commit is contained in:
kris 2008-04-24 22:08:36 +00:00
parent c3a2df13fc
commit d6c5faf2cc

View File

@ -2583,6 +2583,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS)
return (error);
}
fdp = fdhold(p);
if (fdp == NULL)
return (0);
PROC_UNLOCK(p);
kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK);
FILEDESC_SLOCK(fdp);