diff options
author | mohans <mohans@FreeBSD.org> | 2007-01-31 23:10:27 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2007-01-31 23:10:27 +0000 |
commit | 5f0bd46234ed1427238859d88e9aa03971f8921d (patch) | |
tree | d25d3e2d94af85194d06aac9a59990a6cbc5efd5 /sys/nfsclient | |
parent | 5918b89319b6e549759fa98fe6067d84b81d80c1 (diff) | |
download | FreeBSD-src-5f0bd46234ed1427238859d88e9aa03971f8921d.zip FreeBSD-src-5f0bd46234ed1427238859d88e9aa03971f8921d.tar.gz |
Fix for a vnode lock leak in nfs_create() in the event of an error.
Spotted by ups@.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index c53c913..761618b 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -1434,6 +1434,8 @@ nfsmout: if (vap->va_atime.tv_sec == VNOVAL) vap->va_atime = vap->va_mtime; error = nfs_setattrrpc(newvp, vap, cnp->cn_cred, cnp->cn_thread); + if (error) + vput(newvp); } if (!error) { if (cnp->cn_flags & MAKEENTRY) |