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:
parent
fa81466148
commit
11233aabf8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user