This patch fixes the memory leak reported in bug 2818672, where memory is leaked when a new node is created using ezxml_new() and added to an existing document with ezxml_insert(). It frees the root tag allocations when ezxml_insert() is used on a root node.
ezxml.c.patch