summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mountd/mountd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mountd/mountd.c')
-rw-r--r--usr.sbin/mountd/mountd.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index b6ca3cd..6fcb884 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -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.
OpenPOWER on IntegriCloud