summaryrefslogtreecommitdiff
path: root/sys/compat/netbsd/netbsd_getdents.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-02-12 18:41:22 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-02-12 18:41:22 +0000
commitbce72aba44fc06f9485a2c002aebaa7fd92f58c9 (patch)
treea901de254a1adbbb79ca2af589bd871ea67cf9d7 /sys/compat/netbsd/netbsd_getdents.c
parent10bd0832e038949eb0133f149a0bbe6f9501c17a (diff)
More FREF/FRELE protection. This time all users of getvnode.
Diffstat (limited to 'sys/compat/netbsd/netbsd_getdents.c')
-rw-r--r--sys/compat/netbsd/netbsd_getdents.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/compat/netbsd/netbsd_getdents.c b/sys/compat/netbsd/netbsd_getdents.c
index aad9e1a2d45..7e92951d5e4 100644
--- a/sys/compat/netbsd/netbsd_getdents.c
+++ b/sys/compat/netbsd/netbsd_getdents.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_getdents.c,v 1.4 2001/09/05 23:38:28 art Exp $ */
+/* $OpenBSD: netbsd_getdents.c,v 1.5 2002/02/12 18:41:20 art Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -167,9 +167,11 @@ netbsd_sys_getdents(p, v, retval)
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
+ FREF(fp);
error = netbsd_vn_readdir(fp, SCARG(uap, buf), UIO_USERSPACE,
SCARG(uap, count), &done, p, 0, 0);
*retval = done;
+ FRELE(fp);
return (error);
}