summaryrefslogtreecommitdiff
path: root/sys/compat/common
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/common')
-rw-r--r--sys/compat/common/vfs_syscalls_25.c3
-rw-r--r--sys/compat/common/vfs_syscalls_43.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/common/vfs_syscalls_25.c b/sys/compat/common/vfs_syscalls_25.c
index 73178f3e59d..e197407dbc4 100644
--- a/sys/compat/common/vfs_syscalls_25.c
+++ b/sys/compat/common/vfs_syscalls_25.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_25.c,v 1.3 2002/03/14 01:26:49 millert Exp $ */
+/* $OpenBSD: vfs_syscalls_25.c,v 1.4 2002/08/23 15:39:31 art Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -147,7 +147,6 @@ compat_25_sys_fstatfs(p, v, retval)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
- FREF(fp);
mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
error = VFS_STATFS(mp, sp, p);
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c
index cf9a4b229a3..1e6d437229b 100644
--- a/sys/compat/common/vfs_syscalls_43.c
+++ b/sys/compat/common/vfs_syscalls_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_43.c,v 1.19 2002/03/14 01:26:49 millert Exp $ */
+/* $OpenBSD: vfs_syscalls_43.c,v 1.20 2002/08/23 15:39:31 art Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
/*
@@ -355,9 +355,10 @@ compat_43_sys_getdirentries(p, v, retval)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
- if ((fp->f_flag & FREAD) == 0)
- return (EBADF);
- FREF(fp);
+ if ((fp->f_flag & FREAD) == 0) {
+ error = EBADF;
+ goto bad;
+ }
vp = (struct vnode *)fp->f_data;
unionread:
if (vp->v_type != VDIR) {