diff --git a/ChangeLog b/ChangeLog index b790475..30b7dd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ Version 1.6.13 ******************************************************************************* +2011-03-08 Iain Denniston + Fix for memory leak. + 2011-03-08 Iain Denniston Fix and Update of MSVC9 solution and project files - now compile in all modes. Added x64 and static library targets. diff --git a/ixml/src/element.c b/ixml/src/element.c index 7055999..1f59c9e 100644 --- a/ixml/src/element.c +++ b/ixml/src/element.c @@ -272,6 +272,8 @@ int ixmlElement_setAttributeNode( } if (rtAttr != NULL) { *rtAttr = (IXML_Attr *)attrNode; + } else { + ixmlAttr_free((IXML_Attr *)attrNode); } } else { /* Add this attribute */ diff --git a/ixml/src/node.c b/ixml/src/node.c index c9c8dac..c1ab2ce 100644 --- a/ixml/src/node.c +++ b/ixml/src/node.c @@ -588,6 +588,8 @@ int ixmlNode_removeChild( oldChild->parentNode = NULL; if (returnNode != NULL) { *returnNode = oldChild; + } else { + ixmlNode_free(oldChild); } return IXML_SUCCESS;