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

Commit 1f1d7d82 authored by li-wei.cheng's avatar li-wei.cheng Committed by Myles Watson
Browse files

Return after removing sample LTK device

Return directly after calling bta_dm_remove_device to
prevent from accessing the invalid security record (p_dev_rec).

Test: Hardcode to test bond with sample key
Tag: #security
Bug: 162497143
Change-Id: Iaa59f3c415dd8066849fd70912fdb83f890229d7
parent 899fa869
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4551,6 +4551,7 @@ void btm_sec_disconnected(uint16_t handle, uint8_t reason) {
              << p_dev_rec->bd_addr;

    bta_dm_remove_device(p_dev_rec->bd_addr);
    return;
  }

  BTM_TRACE_EVENT("%s after update sec_flags=0x%x", __func__,