diff options
author | jon <jon@FreeBSD.org> | 2005-11-10 23:25:16 +0000 |
---|---|---|
committer | jon <jon@FreeBSD.org> | 2005-11-10 23:25:16 +0000 |
commit | 9b47705fc095f57615fecca1d4785fb00dd1b981 (patch) | |
tree | 4bfabfe60e3b1a023a76b0acc7845262f6dfbcd0 /sys | |
parent | 199b78628d00e9207f3632055b6cb153f2aaf957 (diff) | |
download | FreeBSD-src-9b47705fc095f57615fecca1d4785fb00dd1b981.zip FreeBSD-src-9b47705fc095f57615fecca1d4785fb00dd1b981.tar.gz |
fix a crash when an nfsv2 mount fails
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index b80ab14..2cbf834 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -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); |