Fix for memory leak

(cherry picked from commit 8aca337de7)
This commit is contained in:
Iain Denniston 2011-03-11 18:16:28 +00:00 committed by Marcelo Roberto Jimenez
parent d691732554
commit bbe6d49b46
3 changed files with 7 additions and 0 deletions

View File

@ -255,6 +255,9 @@ Version 1.8.0
Version 1.6.13
*******************************************************************************
2011-03-08 Iain Denniston <iain.denniston(at)gmail.com>
Fix for memory leak.
2011-03-08 Iain Denniston <iain.denniston(at)gmail.com>
Fix and Update of MSVC9 solution and project files - now compile in all
modes. Added x64 and static library targets.

View File

@ -272,6 +272,8 @@ int ixmlElement_setAttributeNode(
}
if (rtAttr != NULL) {
*rtAttr = (IXML_Attr *)attrNode;
} else {
ixmlAttr_free((IXML_Attr *)attrNode);
}
} else {
/* Add this attribute */

View File

@ -588,6 +588,8 @@ int ixmlNode_removeChild(
oldChild->parentNode = NULL;
if (returnNode != NULL) {
*returnNode = oldChild;
} else {
ixmlNode_free(oldChild);
}
return IXML_SUCCESS;