mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-12 23:05:31 +00:00
Avoid a double-free situation when using the SAX load method.
Add missing contents.
This commit is contained in:
parent
89545886f4
commit
6af02aaf9d
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
16
mxml-node.c
16
mxml-node.c
@ -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…
Reference in New Issue
Block a user