summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpedro <pedro@openbsd.org>2007-04-10 11:21:17 +0000
committerpedro <pedro@openbsd.org>2007-04-10 11:21:17 +0000
commitd9fc6bee29e101d72144054318faa2108efe054a (patch)
tree8c16ca52db96fed2e54c246dab0d25613047def3
parentAlways use idiom 'struct cd_softc *cd = (struct cd_softc *)self'. Spotted (diff)
downloadwireguard-openbsd-d9fc6bee29e101d72144054318faa2108efe054a.tar.xz
wireguard-openbsd-d9fc6bee29e101d72144054318faa2108efe054a.zip
Fix yet another vnode leak. If relookup() succeeds, we no longer need
the compensation acquired before ufs_checkpath(). OK tom@ mickey@ beck@
-rw-r--r--sys/ufs/ufs/ufs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 18de827db84..f87fcc46ed8 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_vnops.c,v 1.75 2007/04/02 10:57:17 pedro Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.76 2007/04/10 11:21:17 pedro Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -944,6 +944,7 @@ abortit:
panic("ufs_rename: lost to startdir");
if ((error = relookup(tdvp, &tvp, tcnp)) != 0)
goto out;
+ vrele(tdvp); /* relookup() acquired a reference */
dp = VTOI(tdvp);
xp = NULL;
if (tvp)