I/O Plugins: fix a heap-use-after-free
I/O plugin Controls are destroyed with ~IOPlug, however Session::destroy()'s call to drop_references() still triggers AutomationControl::session_going_away() on the binding proxy. This is even properly documented in session_object.h: > A named object associated with a Session. Objects derived > from this class are expected to be destroyed before the > session calls drop_references().
This commit is contained in:
parent
e79ca8f9ba
commit
947e6c7815
@ -64,6 +64,12 @@ IOPlug::~IOPlug ()
|
||||
for (CtrlOutMap::const_iterator i = _control_outputs.begin(); i != _control_outputs.end(); ++i) {
|
||||
std::dynamic_pointer_cast<ReadOnlyControl>(i->second)->drop_references ();
|
||||
}
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (_control_lock);
|
||||
for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
|
||||
std::dynamic_pointer_cast<AutomationControl>(li->second)->drop_references ();
|
||||
}
|
||||
_controls.clear ();
|
||||
}
|
||||
|
||||
std::string
|
||||
|
Loading…
Reference in New Issue
Block a user