diff options
author | cperciva <cperciva@FreeBSD.org> | 2004-02-22 01:17:47 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2004-02-22 01:17:47 +0000 |
commit | 9576df9a828ddb44a5aa60c1a938a251ab4506d9 (patch) | |
tree | 943ba8787e6ea69d10f7b2b098e04ebdb58ce888 /sys/nfsclient/nfs_vfsops.c | |
parent | d3393323d627e0c98fe2dee6aba82d0fd381ad3d (diff) | |
download | FreeBSD-src-9576df9a828ddb44a5aa60c1a938a251ab4506d9.zip FreeBSD-src-9576df9a828ddb44a5aa60c1a938a251ab4506d9.tar.gz |
If mountnfs returns an error, it will have already freed nam; no need to
free it again.
Reported by: "Ted Unangst" <tedu@coverity.com>
Approved by: rwatson (mentor)
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index efc8772..8970a9c 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -507,7 +507,6 @@ nfs_mountdiskless(char *path, char *which, int mountflag, if ((error = mountnfs(args, mp, nam, which, path, vpp, td->td_ucred)) != 0) { printf("nfs_mountroot: mount %s on %s: %d", path, which, error); - FREE(nam, M_SONAME); return (error); } (void) copystr(which, mp->mnt_stat.f_mntonname, MNAMELEN - 1, 0); |