summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/krb5/krb5_child.c2
-rw-r--r--src/tests/krb5_child-test.c6
-rw-r--r--src/util/sss_krb5.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 6d8269d7..1321f0c1 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -682,7 +682,7 @@ static errno_t add_ticket_times_and_upn_to_response(struct krb5_req *kr)
ret = pam_add_response(kr->pd, SSS_KRB5_INFO_UPN, upn_len,
(uint8_t *) upn);
- krb5_free_unparsed_name(kr->ctx, upn);
+ sss_krb5_free_unparsed_name(kr->ctx, upn);
if (ret != EOK) {
DEBUG(1, ("pack_response_packet failed.\n"));
goto done;
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index 0c6b68b8..89abfd4c 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -333,8 +333,8 @@ print_creds(krb5_context kcontext, krb5_creds *cred, const char *defname)
}
done:
- krb5_free_unparsed_name(kcontext, name);
- krb5_free_unparsed_name(kcontext, sname);
+ sss_krb5_free_unparsed_name(kcontext, name);
+ sss_krb5_free_unparsed_name(kcontext, sname);
}
static errno_t
@@ -381,7 +381,7 @@ print_ccache(const char *cc)
ret = EOK;
done:
krb5_cc_close(kcontext, cache);
- krb5_free_unparsed_name(kcontext, defname);
+ sss_krb5_free_unparsed_name(kcontext, defname);
krb5_free_principal(kcontext, princ);
krb5_free_context(kcontext);
return ret;
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 6382c1aa..5f3177a9 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -535,7 +535,9 @@ void KRB5_CALLCONV sss_krb5_get_init_creds_opt_free (krb5_context context,
void KRB5_CALLCONV sss_krb5_free_unparsed_name(krb5_context context, char *name)
{
-#ifdef HAVE_KRB5_FREE_UNPARSED_NAME
+#ifdef HAVE_KRB5_XFREE
+ krb5_xfree(name);
+#elif HAVE_KRB5_FREE_UNPARSED_NAME
krb5_free_unparsed_name(context, name);
#else
if (name != NULL) {