Fix a tiny memory leak
This commit is contained in:
parent
258fa81d90
commit
f15fc38bd8
@ -2417,7 +2417,8 @@ Session::save_template (const string& template_name, const string& description,
|
|||||||
root = &get_template ();
|
root = &get_template ();
|
||||||
}
|
}
|
||||||
|
|
||||||
root->remove_nodes (X_("description"));
|
root->remove_nodes_and_delete (X_("description"));
|
||||||
|
|
||||||
if (!description.empty()) {
|
if (!description.empty()) {
|
||||||
XMLNode* desc = new XMLNode (X_("description"));
|
XMLNode* desc = new XMLNode (X_("description"));
|
||||||
XMLNode* desc_cont = new XMLNode (X_("content"), description);
|
XMLNode* desc_cont = new XMLNode (X_("content"), description);
|
||||||
|
Loading…
Reference in New Issue
Block a user