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
This commit is contained in:
Simo Sorce 2013-08-27 09:28:14 -04:00 committed by Petr Viktorin
parent f96257397e
commit bea533c69a

View File

@ -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;
}