fix a crash when an nfsv2 mount fails

MFC after:	1 week
This commit is contained in:
Jonathan Chen 2005-11-10 23:25:16 +00:00
parent d9a989231e
commit 0b3e7451da

View File

@ -824,8 +824,10 @@ nfs_lookup(struct vop_lookup_args *ap)
nfsm_strtom(cnp->cn_nameptr, len, NFS_MAXNAMLEN);
nfsm_request(dvp, NFSPROC_LOOKUP, cnp->cn_thread, cnp->cn_cred);
if (error) {
nfsm_postop_attr(dvp, attrflag);
m_freem(mrep);
if (v3) {
nfsm_postop_attr(dvp, attrflag);
m_freem(mrep);
}
goto nfsmout;
}
nfsm_getfh(fhp, fhsize, v3);