mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
covscan: free encryption types in case there is an error
Even when a number of translated encryption types is zero, the array might still be allocated. Call free() in any case as free(NULL) does nothing. Fixes: https://pagure.io/freeipa/issue/8131 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
e8b98555fc
commit
e3ad78538e
@@ -512,6 +512,7 @@ static int ldap_get_keytab(krb5_context krbctx, bool generate, char *password,
|
||||
if (enctypes) {
|
||||
ret = ipa_string_to_enctypes(enctypes, &es, &num_es, err_msg);
|
||||
if (ret || num_es == 0) {
|
||||
free(es);
|
||||
return LDAP_OPERATIONS_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user