Blame SOURCES/autofs-5.0.7-fix-leaked-ldap-percent-hack-allocation-in-lookup_one.patch

306fa1
autofs-5.0.7 - fix leaked ldap percent hack allocation in lookup_one()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Fix a resource leak when calling the percent hack transforms in lookup_one().
306fa1
---
306fa1
 modules/lookup_ldap.c |    1 +
306fa1
 1 file changed, 1 insertion(+)
306fa1
306fa1
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
306fa1
index 26481a8..35ea6ea 100644
306fa1
--- a/modules/lookup_ldap.c
306fa1
+++ b/modules/lookup_ldap.c
306fa1
@@ -2525,6 +2525,7 @@ static int lookup_one(struct autofs_point *ap,
306fa1
 		if (enc_len1 != 0) {
306fa1
 			enc_len2 = encode_percent_hack(qKey, &enc_key2, 1);
306fa1
 			if (enc_len2 < 0) {
306fa1
+				free(enc_key1);
306fa1
 				crit(ap->logopt,
306fa1
 				     "could not use percent hack encode key %s",
306fa1
 				     qKey);