ldap/servers/slapd/ldaputil.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit c1dcfc605b56a61199d827f213c490e109d8279e
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Jul 18 15:50:36 2013 -0400
Ticket 47421 - memory leaks in set_krb5_creds
Bug Description: Valgrind shows memory leaks in set_krb5_creds()
Fix description: krb5_unparse_name() allocates/returns the principle name.
But we can call this function twice without freeing the first
returned value.
https://fedorahosted.org/389/ticket/47421
Reviewed by: richm(Thanks!)
(cherry picked from commit db124a2711576de2dd0009528d60b2860e815210)
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 3041f51..331dd71 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -1901,6 +1901,7 @@ set_krb5_creds(
}
}
+ slapi_ch_free_string(&princ_name);
if ((rc = krb5_unparse_name(ctx, princ, &princ_name))) {
slapi_log_error(SLAPI_LOG_FATAL, logname,
"Unable to get name of principal: "