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