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)
This commit is contained in:
Colin Percival 2004-02-22 01:17:47 +00:00
parent fa81466148
commit 11233aabf8

View File

@ -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);