Fix XMLTree double-free

XMLTree's d'tor frees all child element of the document root
This commit is contained in:
Robin Gareus 2020-08-05 20:27:53 +02:00
parent 57ef7334ef
commit 73165aae95
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 1 additions and 2 deletions

View File

@ -1592,12 +1592,11 @@ PluginManager::save_stats ()
XMLNode* root = new XMLNode (X_("PluginStats"));
for (PluginStatsList::iterator i = statistics.begin(); i != statistics.end(); ++i) {
XMLNode* node = new XMLNode (X_("Plugin"));
XMLNode* node = root->add_child (X_("Plugin"));
node->set_property (X_("type"), (*i).type);
node->set_property (X_("id"), (*i).unique_id);
node->set_property (X_("lru"), (*i).lru);
node->set_property (X_("use-count"), (*i).use_count);
root->add_child_nocopy (*node);
}
XMLTree tree;