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 Kennaway 2008-04-24 22:08:36 +00:00
parent f380a8f773
commit b1ba81d948

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);