summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2014-05-07 17:14:14 +0200
committerStefan Metzmacher <metze@samba.org>2015-03-20 23:25:53 +0100
commitb705ec95d4907f3f887b36963950fe0f18807273 (patch)
treec308afe327e515a30b8425e5aa2d8f543924fd48
parent7296f1b2f5a9bb9287aaee2f57469371d2bf5679 (diff)
downloadsamba-b705ec95d4907f3f887b36963950fe0f18807273.tar.gz
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>
-rw-r--r--source4/kdc/db-glue.c9
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;