filedesc: plug a test for impossible condition in _fget

This commit is contained in:
mjg 2015-01-21 01:06:14 +00:00
parent c25b839fb8
commit 03fe27a773

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