|
|
306fa1 |
autofs-5.0.7 - try and cleanup after dumpmaps
|
|
|
306fa1 |
|
|
|
306fa1 |
From: Ian Kent <raven@themaw.net>
|
|
|
306fa1 |
|
|
|
306fa1 |
Try and cleanup a little after dumping maps.
|
|
|
306fa1 |
It's not really necessary but but can help by reducing the noise
|
|
|
306fa1 |
from valgrind when checking code.
|
|
|
306fa1 |
---
|
|
|
306fa1 |
CHANGELOG | 1 +
|
|
|
306fa1 |
daemon/automount.c | 13 +++++++++++++
|
|
|
306fa1 |
lib/master.c | 2 ++
|
|
|
306fa1 |
3 files changed, 16 insertions(+)
|
|
|
306fa1 |
|
|
|
306fa1 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
306fa1 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
306fa1 |
@@ -59,6 +59,7 @@
|
|
|
306fa1 |
- fix syncronize handle_mounts() shutdown.
|
|
|
306fa1 |
- fix fix wildcard multi map regression.
|
|
|
306fa1 |
- fix dumpmaps multi output.
|
|
|
306fa1 |
+- try and cleanup after dumpmaps.
|
|
|
306fa1 |
|
|
|
306fa1 |
25/07/2012 autofs-5.0.7
|
|
|
306fa1 |
=======================
|
|
|
306fa1 |
--- autofs-5.0.7.orig/daemon/automount.c
|
|
|
306fa1 |
+++ autofs-5.0.7/daemon/automount.c
|
|
|
306fa1 |
@@ -2136,6 +2136,8 @@ int main(int argc, char *argv[])
|
|
|
306fa1 |
}
|
|
|
306fa1 |
|
|
|
306fa1 |
if (dumpmaps) {
|
|
|
306fa1 |
+ struct master_mapent *entry;
|
|
|
306fa1 |
+ struct list_head *head, *p;
|
|
|
306fa1 |
struct mapent_cache *nc;
|
|
|
306fa1 |
|
|
|
306fa1 |
open_log();
|
|
|
306fa1 |
@@ -2152,6 +2154,17 @@ int main(int argc, char *argv[])
|
|
|
306fa1 |
|
|
|
306fa1 |
lookup_nss_read_master(master_list, 0);
|
|
|
306fa1 |
master_show_mounts(master_list);
|
|
|
306fa1 |
+
|
|
|
306fa1 |
+ head = &master_list->mounts;
|
|
|
306fa1 |
+ p = head->next;
|
|
|
306fa1 |
+ while (p != head) {
|
|
|
306fa1 |
+ entry = list_entry(p, struct master_mapent, list);
|
|
|
306fa1 |
+ p = p->next;
|
|
|
306fa1 |
+ master_free_mapent_sources(entry, 1);
|
|
|
306fa1 |
+ master_free_mapent(entry);
|
|
|
306fa1 |
+ }
|
|
|
306fa1 |
+ master_kill(master_list);
|
|
|
306fa1 |
+
|
|
|
306fa1 |
exit(0);
|
|
|
306fa1 |
}
|
|
|
306fa1 |
|
|
|
306fa1 |
--- autofs-5.0.7.orig/lib/master.c
|
|
|
306fa1 |
+++ autofs-5.0.7/lib/master.c
|
|
|
306fa1 |
@@ -1426,6 +1426,8 @@ int master_show_mounts(struct master *ma
|
|
|
306fa1 |
source = source->next;
|
|
|
306fa1 |
}
|
|
|
306fa1 |
|
|
|
306fa1 |
+ lookup_close_lookup(ap);
|
|
|
306fa1 |
+
|
|
|
306fa1 |
printf("\n");
|
|
|
306fa1 |
}
|
|
|
306fa1 |
|