From 8b0de80e4c4bde2182914974a27895e8a5c23eea Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 17 Sep 2010 14:42:54 +0200 Subject: [PATCH] [SAMLv2] fix mem leaks --- lasso/saml-2.0/login.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c index 80b98131..6c08e2f9 100644 --- a/lasso/saml-2.0/login.c +++ b/lasso/saml-2.0/login.c @@ -112,24 +112,28 @@ cleanup: static gboolean want_authn_request_signed(LassoProvider *provider) { char *s; + gboolean rc = TRUE; s = lasso_provider_get_metadata_one_for_role(provider, LASSO_PROVIDER_ROLE_IDP, LASSO_SAML2_METADATA_ATTRIBUTE_WANT_AUTHN_REQUEST_SIGNED); if (g_strcmp0(s, "false") == 0) { - return FALSE; + rc = FALSE; } - return TRUE; + lasso_release_string(s); + return rc; } static gboolean authn_request_signed(LassoProvider *provider) { char *s; + gboolean rc = FALSE; s = lasso_provider_get_metadata_one_for_role(provider, LASSO_PROVIDER_ROLE_SP, LASSO_SAML2_METADATA_ATTRIBUTE_AUTHN_REQUEST_SIGNED); if (g_strcmp0(s, "true") == 0) { - return TRUE; + rc = TRUE; } - return FALSE; + lasso_release_string(s); + return rc; } static gboolean