From: Luke Howard Date: Mon, 13 Sep 2010 14:57:50 +0000 (+0200) Subject: cleanup X-Git-Url: http://www.project-moonshot.org/gitweb/?p=cyrus-sasl.git;a=commitdiff_plain;h=1cf8cc33cf640c034f7bdd5571f69b25a89389ae cleanup --- diff --git a/mech_eap/util_saml.cpp b/mech_eap/util_saml.cpp index 34e494a..4d07af1 100644 --- a/mech_eap/util_saml.cpp +++ b/mech_eap/util_saml.cpp @@ -489,14 +489,13 @@ OM_uint32 samlReleaseAttrContext(OM_uint32 *minor, struct eap_gss_saml_attr_ctx **pCtx) { - eap_gss_saml_attr_ctx *ctx = *pCtx; - - if (ctx != NULL) { - delete ctx; + try { + delete *pCtx; *pCtx = NULL; + } catch (exception &e) { + return mapException(minor, e); } - *minor = 0; return GSS_S_COMPLETE; }