Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0061b1e authored by Chris Manton's avatar Chris Manton
Browse files

Move destructor after stack flag in main/shim/::Stack::Stop()

Legacy shim acl releases controller resources

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I78ccd0d541f82bfec86180f2c2dd0521af651b6d
parent 662be34d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -143,12 +143,12 @@ void Stack::Stop() {
  if (!common::InitFlags::GdCoreEnabled()) {
    bluetooth::shim::hci_on_shutting_down();
  }
  ASSERT_LOG(is_running_, "%s Gd stack not running", __func__);
  is_running_ = false;

  delete acl_;
  acl_ = nullptr;

  ASSERT_LOG(is_running_, "%s Gd stack not running", __func__);
  is_running_ = false;

  delete btm_;
  btm_ = nullptr;