Commit 6af02aaf authored by Michael R Sweet's avatar Michael R Sweet

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

Add missing contents.
parent 89545886
......@@ -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;
}
/*
......
......@@ -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.
*/
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment