diff options
author | 2025-03-16 22:31:55 -0700 | |
---|---|---|
committer | 2025-03-16 22:31:55 -0700 | |
commit | 2c08b685a024cfdc1381c5b4a194a0bf5d0b3449 (patch) | |
tree | ed09ee0eb89d0478558e120658bed956019fd323 | |
parent | 77bd5555fb8c1ed269139449a4893cbb293c24a6 (diff) | |
parent | fc76a428bce4fe5b33807345011554787a9aafe0 (diff) |
Merge "Check for null clcb before deferencing it." into main
-rw-r--r-- | system/bta/gatt/bta_gattc_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/bta/gatt/bta_gattc_utils.cc b/system/bta/gatt/bta_gattc_utils.cc index 23b150b829..1541f391ca 100644 --- a/system/bta/gatt/bta_gattc_utils.cc +++ b/system/bta/gatt/bta_gattc_utils.cc @@ -142,7 +142,7 @@ tBTA_GATTC_CLCB* bta_gattc_find_clcb_by_cif(uint8_t client_if, const RawAddress& tBTA_GATTC_CLCB* bta_gattc_find_clcb_by_conn_id(tCONN_ID conn_id) { if (com::android::bluetooth::flags::gatt_client_dynamic_allocation()) { for (auto& p_clcb : bta_gattc_cb.clcb_set) { - if (p_clcb->in_use && p_clcb->bta_conn_id == conn_id) { + if (p_clcb != NULL && p_clcb->in_use && p_clcb->bta_conn_id == conn_id) { return p_clcb.get(); } } |