From bec8672cc57d9afa3da88aa7bf0e251d3b274b5c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 25 Jan 2010 23:47:43 +0000 Subject: Add new macro lasso_list_add_new_xml_node * lasso/utils.h: fix lasso_list_add_xml_node, it must copy the node before assigning it. add lasso_list_add_new_xml_node for keeping the old behaviour. * lasso/xml/xml.c: fix use of lasso_list_add_xml_node, because copying the node before assigning it is a leak now. --- lasso/xml/xml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lasso/xml/xml.c') diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 9d57b29c..859481cf 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -629,8 +629,8 @@ lasso_node_encrypt(LassoNode *lasso_node, xmlSecKey *encryption_public_key, /* Create a new EncryptedElement */ encrypted_element = LASSO_SAML2_ENCRYPTED_ELEMENT(lasso_saml2_encrypted_element_new()); lasso_assign_gobject(encrypted_element->original_data, lasso_node); - lasso_list_add_xml_node(encrypted_element->EncryptedKey, xmlCopyNode(encrypted_key_node, 1)); - lasso_assign_xml_node(encrypted_element->EncryptedData, xmlCopyNode(xmlDocGetRootElement(doc), 1)); + lasso_list_add_xml_node(encrypted_element->EncryptedKey, encrypted_key_node); + lasso_assign_xml_node(encrypted_element->EncryptedData, xmlDocGetRootElement(doc)); lasso_transfer_gobject(ret, encrypted_element); cleanup: -- cgit