Use XMLNode::remove_child_and_delete in Stateful::add_extra_xml
As the node being replaced has been added with XMLNode::add_child_nocopy the node also needs to be deleted or a memory leak occurs.
This commit is contained in:
parent
4e6cdb4daa
commit
a4daf93f2f
@ -69,7 +69,7 @@ Stateful::add_extra_xml (XMLNode& node)
|
|||||||
_extra_xml = new XMLNode ("Extra");
|
_extra_xml = new XMLNode ("Extra");
|
||||||
}
|
}
|
||||||
|
|
||||||
_extra_xml->remove_nodes (node.name());
|
_extra_xml->remove_nodes_and_delete (node.name());
|
||||||
_extra_xml->add_child_nocopy (node);
|
_extra_xml->add_child_nocopy (node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user