When mountd.c parses the nfsv4 root line(s) in /etc/exports, it
allocates data structures that are never linked into the tree or free'd. As such, mountd would leak memory every time it parsed an nfsv4 root line. This patch frees up those structures to plug the leak. Approved by: kib (mentor)
This commit is contained in:
parent
96c5d068d8
commit
73f4ccbd29
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194773
@ -1414,8 +1414,20 @@ get_exportlist_one()
|
||||
/*
|
||||
* For V4: don't enter in mount lists.
|
||||
*/
|
||||
if (v4root_phase > 0 && v4root_phase <= 2)
|
||||
if (v4root_phase > 0 && v4root_phase <= 2) {
|
||||
/*
|
||||
* Since these structures aren't used by mountd,
|
||||
* free them up now.
|
||||
*/
|
||||
if (ep != NULL)
|
||||
free_exp(ep);
|
||||
while (tgrp != NULL) {
|
||||
grp = tgrp;
|
||||
tgrp = tgrp->gr_next;
|
||||
free_grp(grp);
|
||||
}
|
||||
goto nextline;
|
||||
}
|
||||
|
||||
/*
|
||||
* Success. Update the data structures.
|
||||
|
Loading…
Reference in New Issue
Block a user