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

Commit 0d4cf678 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents b08e05ca ccb18ded
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();
  }
}