Blame SOURCES/autofs-5.1.1-fix-memory-leak-in-ldap-do_init.patch

306fa1
autofs-5.1.1 - fix memory leak in ldap do_init()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Fix error return without free of temporory allocated storage in
306fa1
do_init().
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG             |    1 +
306fa1
 modules/lookup_ldap.c |    1 +
306fa1
 2 files changed, 2 insertions(+)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -199,6 +199,7 @@
306fa1
 - fix unbind sasl external mech.
306fa1
 - fix sasl connection concurrancy problem.
306fa1
 - fix memory leak in nisplus lookup_reinit().
306fa1
+- fix memory leak in ldap do_init().
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/modules/lookup_ldap.c
306fa1
+++ autofs-5.0.7/modules/lookup_ldap.c
306fa1
@@ -1752,6 +1752,7 @@ static int do_init(const char *mapfmt,
306fa1
 		 */
306fa1
 		if (!parse_server_string(LOGOPT_NONE, tmp, ctxt)) {
306fa1
 			error(LOGOPT_ANY, MODPREFIX "cannot parse server string");
306fa1
+			free(tmp);
306fa1
 			return 1;
306fa1
 		}
306fa1
 		free(tmp);