diff options
author | jhb <jhb@FreeBSD.org> | 2007-03-26 15:14:58 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-03-26 15:14:58 +0000 |
commit | c2c01f044f1ab6ae72be93d67baac72a8f61ea1f (patch) | |
tree | 299ff6562c0d52b276663a3a38a6bbd5999ebf09 | |
parent | d101cd655d0772c860ec5a04756c361b20f5acf0 (diff) | |
download | FreeBSD-src-c2c01f044f1ab6ae72be93d67baac72a8f61ea1f.zip FreeBSD-src-c2c01f044f1ab6ae72be93d67baac72a8f61ea1f.tar.gz |
Initialize vfslocked to 0 before nfsm_srvmtofh() so that the variable is
not used uninitialized in 'nfsmout' if nfsm_srvmtofh() gets an internal
error.
CID: 1766
Found by: Coverity Prevent (tm)
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 85c7b52..1b8cd89 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -4051,6 +4051,7 @@ nfsrv_fsinfo(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, if (!v3) panic("nfsrv_fsinfo: v3 proc called on a v2 connection"); fhp = &nfh.fh_generic; + vfslocked = 0; nfsm_srvmtofh(fhp); error = nfsrv_fhtovp(fhp, 1, &vp, &vfslocked, cred, slp, nam, &rdonly, TRUE); |