diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 159e190fd4d4..d0c290c37639 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -2586,10 +2586,9 @@ nfsrv_symlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, vap, pathcp); if (error) NDFREE(&nd, NDF_ONLY_PNBUF); - else { + else vput(nd.ni_vp); - nd.ni_vp = NULL; - } + nd.ni_vp = NULL; /* * releases directory prior to potential lookup op. */