From 70839889c667b595faada0bbb777afcf1b3955c8 Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Mon, 11 May 2009 18:45:04 +0000 Subject: [PATCH] Modify nfsvno_fhtovp() to ensure that it always sets the credp argument. Returning without credp set could result in a caller doing crfree() on garbage. Reviewed by: kan Approved by: kib (mentor) --- sys/fs/nfsserver/nfs_nfsdport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 5dbb21d3e3ab..07cbcdf92f0b 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2422,6 +2422,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct sockaddr *nam, int error; int numsecflavor, *secflavors; + *credp = NULL; error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); if (nam && !error) { error = VFS_CHECKEXP(mp, nam, &exp->nes_exflag, credp,