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

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