autofs-5.0.5 - fix null cache clean

From: Ian Kent <raven@themaw.net>

A function to clean the null map entry cache was added to
avoid a race when re-reading the master map. That function
mistakenly fails to clear the hash bucket array entries
which leads to a segmentation fault on the next null cache
lookup.
---

 CHANGELOG   |    1 +
 lib/cache.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/CHANGELOG b/CHANGELOG
index b3e423b..f51e93b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -65,6 +65,7 @@
 - fix paged ldap map read.
 - fix next task list update.
 - fix stale map read.
+- fix null cache clean.
 
 03/09/2009 autofs-5.0.5
 -----------------------
diff --git a/lib/cache.c b/lib/cache.c
index a096150..9acf736 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -249,6 +249,7 @@ void cache_clean_null_cache(struct mapent_cache *mc)
 			free(me->key);
 			free(me);
 		}
+		mc->hash[i] = NULL;
 	}
 
 	return;