From bea533c69a2b11e4a774144b8ee335e458333f7a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 27 Aug 2013 09:28:14 -0400 Subject: kdb-princ: Fix memory leak If we do not store the keys in the entry we need to free the array before continuing or the data is leaked. CoverityID: 11910 Fixes: https://fedorahosted.org/freeipa/ticket/3884 --- daemons/ipa-kdb/ipa_kdb_principals.c | 1 + 1 file changed, 1 insertion(+) (limited to 'daemons') diff --git a/daemons/ipa-kdb/ipa_kdb_principals.c b/daemons/ipa-kdb/ipa_kdb_principals.c index 66d434a53..38059d29f 100644 --- a/daemons/ipa-kdb/ipa_kdb_principals.c +++ b/daemons/ipa-kdb/ipa_kdb_principals.c @@ -413,6 +413,7 @@ static krb5_error_code ipadb_parse_ldap_entry(krb5_context kcontext, if ((*active_ua & ~IPADB_USER_AUTH_DISABLED) != IPADB_USER_AUTH_EMPTY && !(*active_ua & IPADB_USER_AUTH_PASSWORD)) { /* This is the same behavior as ENOENT below. */ + ipa_krb5_free_key_data(res_key_data, result); break; } -- cgit