filedesc: plug a test for impossible condition in _fget

This commit is contained in:
Mateusz Guzik 2015-01-21 01:06:14 +00:00
parent 4098ccafa4
commit c31c057957

View File

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