filedesc: plug a test for impossible condition in fgetvp_rights
This commit is contained in:
parent
f17575acc9
commit
0c0d16e8ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274904
@ -2571,9 +2571,7 @@ fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp,
|
||||
int error;
|
||||
#endif
|
||||
|
||||
if (td == NULL || (fdp = td->td_proc->p_fd) == NULL)
|
||||
return (EBADF);
|
||||
|
||||
fdp = td->td_proc->p_fd;
|
||||
fp = fget_locked(fdp, fd);
|
||||
if (fp == NULL || fp->f_ops == &badfileops)
|
||||
return (EBADF);
|
||||
|
Loading…
Reference in New Issue
Block a user