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

Commit c5c5ed3d authored by Hansong Zhang's avatar Hansong Zhang
Browse files

btm_process_remote_ext_features: return if no record

It's not possible that we don't have a security when we receive remote
ext features, because we create a record upon ACL connection.  Not
possible for direct bonding as well.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I70313e7e34d72741826f712baeccc4bdcb531757
parent 1dbff51c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -874,10 +874,8 @@ void btm_process_remote_ext_features(tACL_CONN* p_acl_cb,
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev_by_handle(handle);
  uint8_t page_idx;

  /* Make sure we have the record to save remote features information */
  if (p_dev_rec == NULL) {
    /* Get a new device; might be doing dedicated bonding */
    p_dev_rec = btm_find_or_alloc_dev(p_acl_cb->remote_addr);
  if (p_dev_rec == nullptr) {
    return;
  }

  p_acl_cb->num_read_pages = num_read_pages;