X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mech_eap%2Futil_context.c;h=78c3636ab55628e74a2392431cb5273c1182afa9;hb=5bf61a81066da96847e6317c00db9d4f96447db2;hp=80324bf5a48a9c3a5f60c92b99e35485c3bf8b48;hpb=54fa5230688cd4ecef74aaef6ebb3193e24f47f8;p=mech_eap.git diff --git a/mech_eap/util_context.c b/mech_eap/util_context.c index 80324bf..78c3636 100644 --- a/mech_eap/util_context.c +++ b/mech_eap/util_context.c @@ -52,7 +52,7 @@ gssEapAllocContext(OM_uint32 *minor, } if (GSSEAP_MUTEX_INIT(&ctx->mutex) != 0) { - *minor = errno; + *minor = GSSEAP_GET_LAST_ERROR(); gssEapReleaseContext(&tmpMinor, &ctx); return GSS_S_FAILURE; } @@ -100,7 +100,7 @@ releaseAcceptorContext(struct gss_eap_acceptor_ctx *ctx) if (ctx->vps != NULL) gssEapRadiusFreeAvps(&tmpMinor, &ctx->vps); } -#endif +#endif /* GSSEAP_ENABLE_ACCEPTOR */ OM_uint32 gssEapReleaseContext(OM_uint32 *minor, @@ -120,7 +120,7 @@ gssEapReleaseContext(OM_uint32 *minor, if (ctx->flags & CTX_FLAG_KRB_REAUTH) { gssDeleteSecContext(&tmpMinor, &ctx->reauthCtx, GSS_C_NO_BUFFER); } else -#endif +#endif /* GSSEAP_ENABLE_REAUTH */ if (CTX_IS_INITIATOR(ctx)) { releaseInitiatorContext(&ctx->initiatorCtx); } @@ -128,7 +128,7 @@ gssEapReleaseContext(OM_uint32 *minor, else { releaseAcceptorContext(&ctx->acceptorCtx); } -#endif +#endif /* GSSEAP_ENABLE_ACCEPTOR */ krb5_free_keyblock_contents(krbContext, &ctx->rfc3961Key); gssEapReleaseName(&tmpMinor, &ctx->initiatorName);