From cbc6ccd195f6f7e412733cbd6ff4c1b9d07662d1 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 19 Sep 2013 21:39:11 -0400 Subject: [PATCH] Use service spicifics utility functions correctly --- mech_eap/accept_sec_context.c | 6 +----- mech_eap/util.h | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mech_eap/accept_sec_context.c b/mech_eap/accept_sec_context.c index 9888097..95e0e0d 100644 --- a/mech_eap/accept_sec_context.c +++ b/mech_eap/accept_sec_context.c @@ -378,11 +378,7 @@ setAcceptorIdentity(OM_uint32 *minor, PW_GSS_ACCEPTOR_SERVICE_SPECIFICS, 0, &nameBuf); -#ifdef HAVE_HEIMDAL_VERSION - krb5_xfree(ssi); -#else - krb5_free_unparsed_name(krbContext, ssi); -#endif + krbFreeUnparsedName(krbContext, &nameBuf); if (GSS_ERROR(major)) return major; } diff --git a/mech_eap/util.h b/mech_eap/util.h index 9a606ab..dabec26 100644 --- a/mech_eap/util.h +++ b/mech_eap/util.h @@ -1051,7 +1051,11 @@ krbPrincUnparseServiceSpecifics(krb5_context krbContext, krb5_principal krbPrinc static inline void krbFreeUnparsedName(krb5_context krbContext, gss_buffer_t nameBuf) { +#ifdef HAVE_HEIMDAL_VERSION + krb5_xfree((char *) nameBuf->value); +#else krb5_free_unparsed_name(krbContext, (char *)(nameBuf->value)); +#endif nameBuf->value = NULL; nameBuf->length = 0; } -- 2.1.4