mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 03:45:11 +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