diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 0db5c9dd5f6..b9d54af3bcf 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -2000,6 +2000,8 @@ out: error = VFS_VPTOFH(vp, &fhp->fh_fid); if (!error) error = VOP_GETATTR(vp, vap, cred, td); + } + if (vp) { vput(vp); vp = NULL; nd.ni_vp = NULL;