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

Commit 49a56a76 authored by jonerlin's avatar jonerlin Committed by android-build-merger
Browse files

Merge "Prevent bluetooth native crash during failed security authentication" am: 83b03086

am: 2798e14c

Change-Id: Iaaa9b0f2e525b6f4c428bc3ee0786ab8aeb36767
parents ed957af1 2798e14c
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -4310,12 +4310,15 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, uint8_t status,
      }
      }
    }
    }


    if (!addr_matched) {
    /* p_auth_complete_callback might have freed the p_dev_rec, ensure it exists
      /* Don't callback unless this Connection-Complete-failure event has the
     * before accessing */
       * same mac address as the bonding device */
    p_dev_rec = btm_find_dev(bda);
    if (!p_dev_rec) {
      /* Don't callback when device security record was removed */
      VLOG(1) << __func__
      VLOG(1) << __func__
              << ": Different mac addresses: pairing_bda=" << btm_cb.pairing_bda
              << ": device security record associated with this bda has been "
              << ", bda=" << bda << ", do not callback";
                 "removed! bda="
              << bda << ", do not callback!";
      return;
      return;
    }
    }