autofs-5.0.1 - library reload fix update fix 2 From: Ian Kent <raven@themaw.net> The library reload fixes introduced a bug which causes autofs to not release mount thread resources when using submounts. --- daemon/automount.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- autofs-5.0.1.orig/daemon/automount.c +++ autofs-5.0.1/daemon/automount.c @@ -1445,14 +1445,21 @@ static void handle_mounts_cleanup(void * master_remove_mapent(ap->entry); master_source_unlock(ap->entry); + destroy_logpri_fifo(ap); + + /* + * Submounts are detached threads and don't belong to the + * master map entry list so we need to free their resources + * here. + */ if (submount) { mounts_mutex_unlock(ap->parent); master_source_unlock(ap->parent->entry); + master_free_mapent_sources(ap->entry, 1); + master_free_mapent(ap->entry); } master_mutex_unlock(); - destroy_logpri_fifo(ap); - if (clean) { if (rmdir(path) == -1) { char *estr = strerror_r(errno, buf, MAX_ERR_BUF);