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
f380a8f773
commit
b1ba81d948
@ -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