filedesc: plug a test for impossible condition in fgetvp_rights

This commit is contained in:
Mateusz Guzik 2014-11-23 00:12:27 +00:00
parent f17575acc9
commit 0c0d16e8ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274904

View File

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