summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-02-29 17:15:08 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-02-29 17:15:08 +0000
commit537db7e9e2bf300e3336d067f92b29e35eb52495 (patch)
treef2568c324ce8dec332a82d3b3484dee82ea4998e
parent3823298a1a2163b91720b2a3b15b84b363eec1d4 (diff)
* id-ff/logout.c: (lasso_logout_init_request) free remote_provider_id before setting it. free profile->request
before setting it if LASSO_IS_NODE(request), not just LASSO_IS_LIB_LOGOUT_REQUEST(request). Fix memory leaks.
-rw-r--r--lasso/id-ff/logout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c
index c8c9f5d5..ea1e929f 100644
--- a/lasso/id-ff/logout.c
+++ b/lasso/id-ff/logout.c
@@ -330,6 +330,7 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID,
/* get the remote provider id
If remote_providerID is NULL, then get the first remote provider id in session */
+ g_free(profile->remote_providerID);
if (remote_providerID == NULL) {
profile->remote_providerID = lasso_session_get_provider_index(session, 0);
} else {
@@ -441,7 +442,7 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID,
}
/* before setting profile->request, verify it is not already set */
- if (LASSO_IS_LIB_LOGOUT_REQUEST(profile->request) == TRUE) {
+ if (LASSO_IS_NODE(profile->request) == TRUE) {
lasso_node_destroy(LASSO_NODE(profile->request));
profile->request = NULL;
}