From: Greg Hudson Date: Fri, 5 Mar 2010 20:35:26 +0000 (+0000) Subject: Release the internal_name field of a SPNEGO context if it has not been X-Git-Tag: krb5-1.9-beta1~318 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48a8cb4a973b23c3c11598eb4742fea36a37c4b5;p=krb5.git Release the internal_name field of a SPNEGO context if it has not been claimed for a caller argument. ticket: 6674 target_version: 1.8.1 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23772 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index f7fcb5e55..95e450979 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -1742,6 +1742,7 @@ cleanup: if (sc->internal_name != GSS_C_NO_NAME && src_name != NULL) { *src_name = sc->internal_name; + sc->internal_name = GSS_C_NO_NAME; } release_spnego_ctx(&sc); } else if (ret != GSS_S_CONTINUE_NEEDED) { @@ -2627,6 +2628,8 @@ release_spnego_ctx(spnego_gss_ctx_id_t *ctx) (void) generic_gss_release_oid(&minor_stat, &context->internal_mech); + (void) gss_release_name(&minor_stat, &context->internal_name); + if (context->optionStr != NULL) { free(context->optionStr); context->optionStr = NULL;