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

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