You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
686 B

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