Fix some small memory leak (libardour)
authorRobin Gareus <robin@gareus.org>
Sat, 27 Jan 2018 14:45:12 +0000 (15:45 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 27 Jan 2018 14:45:12 +0000 (15:45 +0100)
libs/ardour/session_state.cc

index 0110b8e156f66819aa5e10b4665e1f549146aacd..ebb2b99cc1406eb8bebe068e6b041feef0eea170 100644 (file)
@@ -3974,7 +3974,6 @@ Session::restore_history (string snapshot_name)
        for (XMLNodeConstIterator it  = tree.root()->children().begin(); it != tree.root()->children().end(); ++it) {
 
                XMLNode *t = *it;
-               UndoTransaction* ut = new UndoTransaction ();
 
                std::string name;
                int64_t tv_sec;
@@ -3985,6 +3984,7 @@ Session::restore_history (string snapshot_name)
                        continue;
                }
 
+               UndoTransaction* ut = new UndoTransaction ();
                ut->set_name (name);
 
                struct timeval tv;