diff options
Diffstat (limited to 'sys/compat/linux/linux_stats.c')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 8f1799c..80b1c02 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -160,9 +160,8 @@ linux_newfstat(struct thread *td, struct linux_newfstat_args *args) printf(ARGS(newfstat, "%d, *"), args->fd); #endif - fp = ffind_hold(td, args->fd); - if (fp == NULL) - return (EBADF); + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); error = fo_stat(fp, &buf, td); fdrop(fp, td); |