From: Luke Howard Date: Sat, 18 Sep 2010 16:04:24 +0000 (+0200) Subject: insert missing call to gss_eap_attr_ctx constructor X-Git-Url: http://www.project-moonshot.org/gitweb/?p=cyrus-sasl.git;a=commitdiff_plain;h=c99b0323567bcfe7622cecc0829e73774114fa78 insert missing call to gss_eap_attr_ctx constructor --- diff --git a/mech_eap/util_attr.cpp b/mech_eap/util_attr.cpp index 398aa57..681dc5f 100644 --- a/mech_eap/util_attr.cpp +++ b/mech_eap/util_attr.cpp @@ -560,10 +560,12 @@ gssEapExportAttrContext(OM_uint32 *minor, buffer->value = NULL; return GSS_S_COMPLETE; - }; + } try { name->attrCtx->exportToBuffer(buffer); + if (buffer->length == 0) + return GSS_S_FAILURE; } catch (std::exception &e) { return mapException(minor, e); } @@ -582,7 +584,7 @@ gssEapImportAttrContext(OM_uint32 *minor, if (buffer->length != 0) { try { - ctx = new gss_eap_attr_ctx; + ctx = new gss_eap_attr_ctx(); if (!ctx->initFromBuffer(NULL, buffer)) { delete ctx; @@ -609,6 +611,7 @@ gssEapDuplicateAttrContext(OM_uint32 *minor, try { if (in->attrCtx != NULL) { + ctx = new gss_eap_attr_ctx(); if (!ctx->initFromExistingContext(NULL, in->attrCtx)) { delete ctx; return GSS_S_FAILURE; @@ -706,7 +709,7 @@ gssEapCreateAttrContext(gss_cred_id_t gssCred, { gss_eap_attr_ctx *ctx; - ctx = new gss_eap_attr_ctx; + ctx = new gss_eap_attr_ctx(); if (!ctx->initFromGssContext(NULL, gssCred, gssCtx)) { delete ctx; return NULL;