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:
parent
c3a2df13fc
commit
d6c5faf2cc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user