Blame SOURCES/autofs-5.1.0-fix-leak-in-cache_push_mapent.patch

304803
autofs-5.1.0 - fix leak in cache_push_mapent()
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
cache_push_mapent() incorectly sets the cache entry mapent to the old
304803
value which causes a memory leak when the new map entry isn't NULL.
304803
---
304803
 CHANGELOG   |    1 +
304803
 lib/cache.c |    2 +-
304803
 2 files changed, 2 insertions(+), 1 deletion(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -130,6 +130,7 @@
304803
 - dont allocate dev_ctl_ops too early.
304803
 - fix incorrect round robin host detection.
304803
 - fix race accessing qdn in get_query_dn().
304803
+- fix leak in cache_push_mapent().
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/lib/cache.c
304803
+++ autofs-5.0.7/lib/cache.c
304803
@@ -203,7 +203,7 @@ int cache_push_mapent(struct mapent *me,
304803
 
304803
 	s->mapent = me->mapent;
304803
 	s->age = me->age;
304803
-	me->mapent = mapent;
304803
+	me->mapent = new;
304803
 
304803
 	if (me->stack)
304803
 		s->next = me->stack;