summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_syscalls.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-02-12 13:05:33 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-02-12 13:05:33 +0000
commit8b08ca52ce00cfd942606cbd6b616b85ca682d3f (patch)
tree7ee8adff016b64c02b113fe28bd2af5bd879580e /sys/nfs/nfs_syscalls.c
parent73693552d13e63640043dc3768acb73e9cddb534 (diff)
Fix all users of getsock to use FREF/FRELE properly.
Diffstat (limited to 'sys/nfs/nfs_syscalls.c')
-rw-r--r--sys/nfs/nfs_syscalls.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index 1ea7a994fe1..910b9c3e29d 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_syscalls.c,v 1.28 2002/02/10 22:02:05 nate Exp $ */
+/* $OpenBSD: nfs_syscalls.c,v 1.29 2002/02/12 13:05:32 art Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
/*
@@ -287,6 +287,7 @@ sys_nfssvc(p, v, retval)
error = getsock(p->p_fd, nfsdarg.sock, &fp);
if (error)
return (error);
+ FREF(fp);
/*
* Get the client address for connected sockets.
*/
@@ -295,10 +296,13 @@ sys_nfssvc(p, v, retval)
else {
error = sockargs(&nam, nfsdarg.name, nfsdarg.namelen,
MT_SONAME);
- if (error)
+ if (error) {
+ FRELE(fp);
return (error);
+ }
}
error = nfssvc_addsock(fp, nam);
+ FRELE(fp);
#endif /* !NFSSERVER */
} else {
#ifndef NFSSERVER