filedesc: plug a test for impossible condition in _fget
This commit is contained in:
parent
4098ccafa4
commit
c31c057957
@ -2439,8 +2439,7 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags,
|
||||
int error;
|
||||
|
||||
*fpp = NULL;
|
||||
if (td == NULL || (fdp = td->td_proc->p_fd) == NULL)
|
||||
return (EBADF);
|
||||
fdp = td->td_proc->p_fd;
|
||||
if (needrightsp != NULL)
|
||||
needrights = *needrightsp;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user