diff options
Diffstat (limited to 'lasso/xml')
-rw-r--r-- | lasso/xml/lib_federation_termination_notification.c | 4 | ||||
-rw-r--r-- | lasso/xml/saml-2.0/samlp2_request_abstract.c | 2 | ||||
-rw-r--r-- | lasso/xml/saml-2.0/samlp2_status_response.c | 2 | ||||
-rw-r--r-- | lasso/xml/saml_assertion.c | 4 | ||||
-rw-r--r-- | lasso/xml/tools.c | 14 | ||||
-rw-r--r-- | lasso/xml/ws/wsse_username_token.c | 8 | ||||
-rw-r--r-- | lasso/xml/xml.c | 20 |
7 files changed, 27 insertions, 27 deletions
diff --git a/lasso/xml/lib_federation_termination_notification.c b/lasso/xml/lib_federation_termination_notification.c index aed69fdd..4758921a 100644 --- a/lasso/xml/lib_federation_termination_notification.c +++ b/lasso/xml/lib_federation_termination_notification.c @@ -21,7 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#include "../utils.h" #include "private.h" #include "lib_federation_termination_notification.h" #include <libxml/uri.h> @@ -98,7 +98,7 @@ build_query(LassoNode *node) t = xmlURIEscapeStr((xmlChar*)request->RelayState, NULL); s = g_strdup_printf((char*)t, "%s&RelayState=%s", query, request->RelayState); xmlFree(t); - g_free(query); + lasso_release(query); query = s; } diff --git a/lasso/xml/saml-2.0/samlp2_request_abstract.c b/lasso/xml/saml-2.0/samlp2_request_abstract.c index 810ede28..9eaa187f 100644 --- a/lasso/xml/saml-2.0/samlp2_request_abstract.c +++ b/lasso/xml/saml-2.0/samlp2_request_abstract.c @@ -108,7 +108,7 @@ build_query(LassoNode *node) return NULL; } ret = g_strdup_printf(LASSO_SAML2_FIELD_REQUEST "=%s", deflated_message); - g_free(deflated_message); + lasso_release(deflated_message); return ret; } diff --git a/lasso/xml/saml-2.0/samlp2_status_response.c b/lasso/xml/saml-2.0/samlp2_status_response.c index f93931ef..9cf004f8 100644 --- a/lasso/xml/saml-2.0/samlp2_status_response.c +++ b/lasso/xml/saml-2.0/samlp2_status_response.c @@ -107,7 +107,7 @@ build_query(LassoNode *node) return NULL; } ret = g_strdup_printf(LASSO_SAML2_FIELD_RESPONSE "=%s", deflated_message); - g_free(deflated_message); + lasso_release(deflated_message); return ret; } diff --git a/lasso/xml/saml_assertion.c b/lasso/xml/saml_assertion.c index 605cefc8..2e3afcc7 100644 --- a/lasso/xml/saml_assertion.c +++ b/lasso/xml/saml_assertion.c @@ -136,8 +136,8 @@ insure_namespace(xmlNode *xmlnode, xmlNs *ns) (xmlChar*)typename); } } - g_free(gtypename); - g_free(typename); + lasso_release(gtypename); + lasso_release(typename); } insure_namespace(t, ns); diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c index 62c413c7..d6aa5ef5 100644 --- a/lasso/xml/tools.c +++ b/lasso/xml/tools.c @@ -520,10 +520,10 @@ lasso_query_sign(char *query, LassoSignatureMethod sign_method, const char *priv } done: - g_free(new_query); + lasso_release(new_query); xmlFree(digest); BIO_free(bio); - g_free(sigret); + lasso_release(sigret); xmlFree(b64_sigret); xmlFree(e_b64_sigret); @@ -1074,14 +1074,14 @@ lasso_node_build_deflated_query(LassoNode *node) } } if (rc != Z_OK) { - g_free(ret); + lasso_release(ret); message(G_LOG_LEVEL_CRITICAL, "Failed to deflate"); return NULL; } b64_ret = xmlSecBase64Encode(ret, stream.total_out, 0); xmlOutputBufferClose(buf); - g_free(ret); + lasso_release(ret); ret = xmlURIEscapeStr(b64_ret, NULL); rret = g_strdup((char*)ret); @@ -1417,7 +1417,7 @@ lasso_xml_parse_message(const char *message, LassoMessageFormat constraint, xmlD if (rc >= 0) { b64 = TRUE; } else { - g_free(msg); + lasso_release(msg); msg = (char*)message; } } @@ -1451,7 +1451,7 @@ lasso_xml_parse_message(const char *message, LassoMessageFormat constraint, xmlD goto cleanup; } if (b64) { - g_free(msg); + lasso_release(msg); rc = LASSO_MESSAGE_FORMAT_BASE64; goto cleanup; } @@ -1760,7 +1760,7 @@ lasso_xml_parse_file(const char *filepath) xmlDocPtr ret; ret = lasso_xml_parse_memory(file_content, file_length); - g_free(file_content); + lasso_release(file_content); return ret; } else { message(G_LOG_LEVEL_CRITICAL, "Cannot read XML file %s: %s", filepath, error->message); diff --git a/lasso/xml/ws/wsse_username_token.c b/lasso/xml/ws/wsse_username_token.c index ad71d216..bd407174 100644 --- a/lasso/xml/ws/wsse_username_token.c +++ b/lasso/xml/ws/wsse_username_token.c @@ -243,7 +243,7 @@ _lasso_wsse_username_token_compute_digest(LassoWsseUsernameToken *wsse_username_ memcpy(buffer + nonce_len, wsse_username_token->Created, created_len); memcpy(buffer + nonce_len + created_len, password, password_len); result = g_base64_encode((guchar*)buffer, nonce_len + created_len + password_len); - g_free(buffer); + lasso_release(buffer); return result; } @@ -297,7 +297,7 @@ lasso_wsse_username_token_check_password(LassoWsseUsernameToken *wsse_username_t if (strcmp(private->Password, digest) != 0) { rc = LASSO_WSSEC_ERROR_BAD_PASSWORD; } - g_free(digest); + lasso_release(digest); break; case LASSO_WSSE_USERNAME_TOKEN_PASSWORD_TYPE_TEXT: if (strcmp(private->Password, password) != 0) { @@ -360,12 +360,12 @@ lasso_wsse_username_token_derive_key(LassoWsseUsernameToken *wsse_username_token } iteration--; } - g_free(buffer); + lasso_release(buffer); result = g_malloc(20); memcpy(result, hash1, 20); exit: - g_free(salt); + lasso_release(salt); return result; } diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index ef80bcde..0541272a 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -620,7 +620,7 @@ lasso_node_init_from_query(LassoNode *node, const char *query) xmlFree(query_fields[i]); query_fields[i] = NULL; } - g_free(query_fields); + lasso_release(query_fields); return rc; } @@ -1570,9 +1570,9 @@ base_class_finalize(LassoNodeClass *class) xmlFreeNs(data->ns); } if (data->node_name) { - g_free(data->node_name); + lasso_release(data->node_name); } - g_free(class->node_data); + lasso_release(class->node_data); class->node_data = NULL; } } @@ -1988,7 +1988,7 @@ lasso_node_init_from_message_with_format(LassoNode *node, const char *message, L if (rc >= 0) { b64 = TRUE; } else { - g_free(msg); + lasso_release(msg); msg = (char*)message; } } @@ -2024,7 +2024,7 @@ lasso_node_init_from_message_with_format(LassoNode *node, const char *message, L goto cleanup; } if (b64) { - g_free(msg); + lasso_release(msg); rc = LASSO_MESSAGE_FORMAT_BASE64; goto cleanup; } @@ -2107,7 +2107,7 @@ void lasso_node_class_set_nodename(LassoNodeClass *klass, char *name) { if (klass->node_data->node_name) - g_free(klass->node_data->node_name); + lasso_release(klass->node_data->node_name); klass->node_data->node_name = g_strdup(name); } @@ -2303,7 +2303,7 @@ lasso_node_build_xmlNode_from_snippets(LassoNode *node, xmlNode *xmlnode, g_assert_not_reached(); } if (snippet->type & SNIPPET_INTEGER) - g_free(str); + lasso_release(str); } if (snippet_any_attribute) { @@ -2361,7 +2361,7 @@ void lasso_node_add_signature_template(LassoNode *node, xmlNode *xmlnode, uri = g_strdup_printf("#%s", id); reference = xmlSecTmplSignatureAddReference(signature, xmlSecTransformSha1Id, NULL, (xmlChar*)uri, NULL); - g_free(uri); + lasso_release(uri); /* add enveloped transform */ xmlSecTmplReferenceAddTransform(reference, xmlSecTransformEnvelopedId); @@ -2591,7 +2591,7 @@ lasso_node_build_query_from_snippets(LassoNode *node) if (s->len) g_string_append(s, "&"); g_string_append(s, v); - g_free(v); + lasso_release(v); continue; } if (v) { @@ -2607,7 +2607,7 @@ lasso_node_build_query_from_snippets(LassoNode *node) xmlFree(t); } if (v) - g_free(v); + lasso_release(v); } return g_string_free(s, FALSE); |