summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-08-20 22:23:10 +0200
committerRobin Gareus <robin@gareus.org>2017-08-20 22:23:10 +0200
commitf15fc38bd82324e76f69a241179dd0f437fb53dd (patch)
tree4b51c1ae71a6d42fef565301d14d49aebebdaed5 /libs/ardour/session_state.cc
parent258fa81d90bd03775d3db92275d35baf9cff62be (diff)
Fix a tiny memory leak
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc3
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);