Fix potential use-after-free (when device in use)

An instance must not delete itself..
Here ARDOUR::SystemExec::Terminated signal handler deleted the
class that emitted the signal in the same thread.
This commit is contained in:
Robin Gareus
2025-05-25 00:21:00 +02:00
parent 958135ff26
commit 72057395eb

View File

@@ -2425,7 +2425,7 @@ AlsaDeviceReservation::release_device ()
_reservation_connection.drop_connections ();
ARDOUR::SystemExec* tmp = _device_reservation;
_device_reservation = 0;
delete tmp;
Glib::signal_idle().connect ([tmp] { delete tmp; return false; }, Glib::PRIORITY_HIGH_IDLE);
}
void