summaryrefslogtreecommitdiffstats
path: root/lasso/id-wsf/wsf_profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lasso/id-wsf/wsf_profile.c')
-rw-r--r--lasso/id-wsf/wsf_profile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lasso/id-wsf/wsf_profile.c b/lasso/id-wsf/wsf_profile.c
index 6e07d934..2f17d933 100644
--- a/lasso/id-wsf/wsf_profile.c
+++ b/lasso/id-wsf/wsf_profile.c
@@ -1275,7 +1275,6 @@ lasso_wsf_profile_process_soap_request_msg(LassoWsfProfile *profile, const gchar
}
doc = xmlParseMemory(message, strlen(message));
- /* FIXME: doc will never be freed */
/* Verify authentication mecanisms */
if (lasso_wsf_profile_has_x509_authentication(profile) == TRUE) {
@@ -1288,8 +1287,10 @@ lasso_wsf_profile_process_soap_request_msg(LassoWsfProfile *profile, const gchar
if (res > 0) {
fault = lasso_soap_fault_new();
fault->faultstring = g_strdup("Invalid signature");
- } else if (res < 0)
+ } else if (res < 0) {
+ xmlFreeDoc(doc);
return res;
+ }
/* FIXME: Remove Signature element if exists, it seg fault when a call to
lasso_node_new_from_xmlNode() */
@@ -1322,6 +1323,8 @@ lasso_wsf_profile_process_soap_request_msg(LassoWsfProfile *profile, const gchar
profile->private_data->fault = fault;
}
+ xmlFreeDoc(doc);
+
return res;
}