From 3ecd56a640faafd281af8c91985981c8ffca2c80 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Mon, 13 Sep 2010 16:57:50 +0200 Subject: [PATCH] cleanup --- util_saml.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util_saml.cpp b/util_saml.cpp index 34e494a..4d07af1 100644 --- a/util_saml.cpp +++ b/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; } -- 2.1.4