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

Commit eed7d0db 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

am: a573559e

Change-Id: I262da17071a1d9f3d7715af4997d3e3d22570ad7
parents b7c62148 a573559e
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();
  }
}