mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
The variable 'observer' (an std::optional) may be left uninitialized if 'incremental_enabled' is false. However, it is used afterwards with a call to disconnect, accessing garbage. Fix by accessing it via the optional wrapper. A call to optional::reset() destroys the observable, which in turn calls disconnect(). Closes #7380