From 48a8cb4a973b23c3c11598eb4742fea36a37c4b5 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 5 Mar 2010 20:35:26 +0000 Subject: [PATCH] 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 --- src/lib/gssapi/spnego/spnego_mech.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.26.2