From 0bd7863ec0ff3bdec7401c303036e25d8d0fe116 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Wed, 20 Sep 2023 16:02:04 +1200 Subject: [PATCH] lib/krb5_wrap: Make use of smb_krb5_make_data() Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- lib/krb5_wrap/krb5_samba.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index a1884853c61..19589b1d7ee 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -261,13 +261,10 @@ krb5_error_code smb_krb5_mk_error(krb5_context context, errpkt.text.length = 0; if (e_text != NULL) { - errpkt.text.length = strlen(e_text); - errpkt.text.data = discard_const_p(char, e_text); + errpkt.text = smb_krb5_make_data(discard_const_p(char, e_text), strlen(e_text)); } - errpkt.e_data.magic = KV5M_DATA; - errpkt.e_data.length = 0; - errpkt.e_data.data = NULL; + errpkt.e_data = smb_krb5_make_data(NULL, 0); if (e_data != NULL) { errpkt.e_data = *e_data; }