summaryrefslogtreecommitdiff
path: root/sys/miscfs/portal/portal_vfsops.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/miscfs/portal/portal_vfsops.c
parent73693552d13e63640043dc3768acb73e9cddb534 (diff)
Fix all users of getsock to use FREF/FRELE properly.
Diffstat (limited to 'sys/miscfs/portal/portal_vfsops.c')
-rw-r--r--sys/miscfs/portal/portal_vfsops.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c
index 86187f81f98..b65841ed79b 100644
--- a/sys/miscfs/portal/portal_vfsops.c
+++ b/sys/miscfs/portal/portal_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: portal_vfsops.c,v 1.11 2002/02/08 13:53:28 art Exp $ */
+/* $OpenBSD: portal_vfsops.c,v 1.12 2002/02/12 13:05:32 art Exp $ */
/* $NetBSD: portal_vfsops.c,v 1.14 1996/02/09 22:40:41 christos Exp $ */
/*
@@ -108,9 +108,13 @@ portal_mount(mp, path, data, ndp, p)
if (so->so_proto->pr_domain->dom_family != AF_UNIX)
return (ESOCKTNOSUPPORT);
+ FREF(fp);
+
error = getnewvnode(VT_PORTAL, mp, portal_vnodeop_p, &rvp); /* XXX */
- if (error)
+ if (error) {
+ FRELE(fp);
return (error);
+ }
MALLOC(rvp->v_data, void *, sizeof(struct portalnode),
M_TEMP, M_WAITOK);
@@ -122,7 +126,9 @@ portal_mount(mp, path, data, ndp, p)
VTOPORTAL(rvp)->pt_size = 0;
VTOPORTAL(rvp)->pt_fileid = PORTAL_ROOTFILEID;
fmp->pm_root = rvp;
- fmp->pm_server = fp; fp->f_count++;
+ fmp->pm_server = fp;
+ fp->f_count++;
+ FRELE(fp);
mp->mnt_flag |= MNT_LOCAL;
mp->mnt_data = (qaddr_t)fmp;