diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-20 22:23:10 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-20 22:23:10 +0200 |
commit | f15fc38bd82324e76f69a241179dd0f437fb53dd (patch) | |
tree | 4b51c1ae71a6d42fef565301d14d49aebebdaed5 /libs/ardour/session_state.cc | |
parent | 258fa81d90bd03775d3db92275d35baf9cff62be (diff) |
Fix a tiny memory leak
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 287822a6a6..b454c33367 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -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); |