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

Add missing contents.
pull/193/head
Michael R Sweet 14 years ago
parent 89545886f4
commit 6af02aaf9d
  1. 5
      mxml-file.c
  2. 16
      mxml-node.c

@ -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.
*/
/*

Loading…
Cancel
Save