1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4-kdc/db_glue: use krb5_copy_principal().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Günther Deschner 2014-05-07 17:14:14 +02:00 committed by Stefan Metzmacher
parent 7296f1b2f5
commit b705ec95d4

View File

@ -1019,14 +1019,7 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
goto out;
}
entry_ex->entry.principal = malloc(sizeof(*(entry_ex->entry.principal)));
if (entry_ex->entry.principal == NULL) {
krb5_clear_error_message(context);
ret = ENOMEM;
goto out;
}
ret = copy_Principal(principal, entry_ex->entry.principal);
ret = krb5_copy_principal(context, principal, &entry_ex->entry.principal);
if (ret) {
krb5_clear_error_message(context);
goto out;