diff options
-rw-r--r-- | source4/kdc/db-glue.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index aaf4c195e81..cc8e8558cb7 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -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; |