13
0

Fix a tiny memory leak

This commit is contained in:
Robin Gareus 2017-08-20 22:23:10 +02:00
parent 258fa81d90
commit f15fc38bd8

View File

@ -2417,7 +2417,8 @@ Session::save_template (const string& template_name, const string& description,
root = &get_template ();
}
root->remove_nodes (X_("description"));
root->remove_nodes_and_delete (X_("description"));
if (!description.empty()) {
XMLNode* desc = new XMLNode (X_("description"));
XMLNode* desc_cont = new XMLNode (X_("content"), description);