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

Commit fc1d2aa0 authored by li-wei.cheng's avatar li-wei.cheng Committed by android-build-team Robot
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
(cherry picked from commit 1f1d7d82)
parent c2db095b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4358,6 +4358,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__,