Fix a tiny memory leak
authorRobin Gareus <robin@gareus.org>
Sun, 20 Aug 2017 20:23:10 +0000 (22:23 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 20 Aug 2017 20:23:10 +0000 (22:23 +0200)
libs/ardour/session_state.cc

index 287822a6a6b9d476ec5c3026d877dd2183e16884..b454c3336729a0096fcfa01417fed73f40705ad4 100644 (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);