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

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