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

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