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

Commit a573559e authored by Greg Kaiser's avatar Greg Kaiser Committed by android-build-merger
Browse files

Merge "SecurityManager: Don't use iterator after erase()"

am: 0d4cf678

Change-Id: I4457ba24b2f431935121a9d57d0a27b59b8a8a9f
parents 9b69375c 0d4cf678
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -92,8 +92,9 @@ void SecurityManagerImpl::CreateBond(hci::AddressWithType device) {
void SecurityManagerImpl::CancelBond(hci::AddressWithType device) {
  auto entry = pairing_handler_map_.find(device.GetAddress());
  if (entry != pairing_handler_map_.end()) {
    auto cancel_me = entry->second;
    pairing_handler_map_.erase(entry);
    entry->second->Cancel();
    cancel_me->Cancel();
  }
}