Fix tiny memory leak

This commit is contained in:
Robin Gareus 2023-06-09 17:23:18 +02:00
parent 9486b4e6cb
commit 5965fd15e5
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -381,6 +381,9 @@ SlavableAutomationControl::remove_master (std::shared_ptr<AutomationControl> m)
if (*before != *after) {
_session.begin_reversible_command (string_compose (_("Merge VCA automation into %1"), name ()));
_session.commit_reversible_command (alist()->memento_command (before, after));
} else {
delete before;
delete after;
}
}
}
@ -455,6 +458,9 @@ SlavableAutomationControl::clear_masters ()
if (*before != *after) {
_session.begin_reversible_command (string_compose (_("Merge VCA automation into %1"), name ()));
_session.commit_reversible_command (alist()->memento_command (before, after));
} else {
delete before;
delete after;
}
}
}