Try and cleanup a little after dumping maps. It's not really necessary but but can help by reducing the noise from valgrind when checking code. --- CHANGELOG | 1 + daemon/automount.c | 13 +++++++++++++ lib/master.c | 2 ++ 3 files changed, 16 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5e58aca..1583c76 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -69,6 +69,7 @@ - unbundle NOTSTRIP from DEBUG so they dont depend on each other. - fix compilation of lookup_ldap.c without sasl. - fix dumpmaps multi output. +- try and cleanup after dumpmaps. 25/07/2012 autofs-5.0.7 ======================= diff --git a/daemon/automount.c b/daemon/automount.c index 1d0b64e..6849272 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -2136,6 +2136,8 @@ int main(int argc, char *argv[]) } if (dumpmaps) { + struct master_mapent *entry; + struct list_head *head, *p; struct mapent_cache *nc; open_log(); @@ -2152,6 +2154,17 @@ int main(int argc, char *argv[]) lookup_nss_read_master(master_list, 0); master_show_mounts(master_list); + + head = &master_list->mounts; + p = head->next; + while (p != head) { + entry = list_entry(p, struct master_mapent, list); + p = p->next; + master_free_mapent_sources(entry, 1); + master_free_mapent(entry); + } + master_kill(master_list); + exit(0); } diff --git a/lib/master.c b/lib/master.c index df6c141..734485e 100644 --- a/lib/master.c +++ b/lib/master.c @@ -1426,6 +1426,8 @@ int master_show_mounts(struct master *master) source = source->next; } + lookup_close_lookup(ap); + printf("\n"); } -- To unsubscribe from this list: send the line "unsubscribe autofs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html