ldap/servers/slapd/ldaputil.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit db124a2711576de2dd0009528d60b2860e815210
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!)
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index ae07c44..f911767 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -1950,6 +1950,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: "