Avoid a double-free situation when using the SAX load method.

Add missing contents.
This commit is contained in:
Michael R Sweet 2011-01-22 01:02:05 +00:00
parent 89545886f4
commit 6af02aaf9d
2 changed files with 19 additions and 2 deletions

View File

@ -3,7 +3,7 @@
*
* File loading code for Mini-XML, a small XML-like file parsing library.
*
* Copyright 2003-2010 by Michael R Sweet.
* Copyright 2003-2011 by Michael R Sweet.
*
* These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright
@ -1946,7 +1946,8 @@ mxml_load_data(
{
(*sax_cb)(node, MXML_SAX_ELEMENT_CLOSE, sax_data);
mxmlRelease(node);
if (!mxmlRelease(node) && first == node)
first = NULL;
}
/*

View File

@ -15,6 +15,22 @@
*
* Contents:
*
* mxmlAdd() - Add a node to a tree.
* mxmlDelete() - Delete a node and all of its children.
* mxmlGetRefCount() - Get the current reference (use) count for a node.
* mxmlNewCDATA() - Create a new CDATA node.
* mxmlNewCustom() - Create a new custom data node.
* mxmlNewElement() - Create a new element node.
* mxmlNewInteger() - Create a new integer node.
* mxmlNewOpaque() - Create a new opaque string.
* mxmlNewReal() - Create a new real number node.
* mxmlNewText() - Create a new text fragment node.
* mxmlNewTextf() - Create a new formatted text fragment node.
* mxmlRemove() - Remove a node from its parent.
* mxmlNewXML() - Create a new XML document tree.
* mxmlRelease() - Release a node.
* mxmlRetain() - Retain a node.
* mxml_new() - Create a new node.
*/
/*