mirror of
https://github.com/esphome/esphome.git
synced 2026-08-24 07:06:20 +00:00
Address review: state the table lifetime where it is freed
Every teardown path routes through release_services(), so the materialized table cannot outlive its link - said at free_service_table_ so the next reviewer need not re-derive it.
This commit is contained in:
@@ -346,6 +346,9 @@ ble_device_base::GattServiceTable BluedroidGattClient::table_view_() const {
|
||||
this->table_desc_total_};
|
||||
}
|
||||
|
||||
// Lifetime: every teardown path (CLOSE_EVT, the safety timeout, stack-down,
|
||||
// passive DISCONNECT) routes through release_services(), so a materialized
|
||||
// table cannot outlive its link.
|
||||
void BluedroidGattClient::free_service_table_() {
|
||||
if (this->table_storage_ == nullptr) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user