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

Commit 5fed5823 authored by Matthew Xie's avatar Matthew Xie Committed by Android (Google) Code Review
Browse files

Merge "LE: Memory leak when caching GATT service change" into klp-dev

parents 6c53a67d 532ee63a
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -736,9 +736,10 @@ void gatt_l2cif_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
            L2CA_DisconnectRsp(lcid);
        }

        if (gatt_is_bda_in_the_srv_chg_clt_list(p_tcb->peer_bda) == NULL)
        {
            if (btm_sec_is_a_bonded_dev(p_tcb->peer_bda) &&
                btm_sec_is_le_capable_dev(p_tcb->peer_bda))
        {
                gatt_add_a_bonded_dev_for_srv_chg(p_tcb->peer_bda);
        }

@@ -768,10 +769,12 @@ void gatt_l2cif_disconnect_cfm_cback(UINT16 lcid, UINT16 result)

    /* look up clcb for this channel */
    if ((p_tcb = gatt_find_tcb_by_cid(lcid)) != NULL)
    {
        /* If the device is not in the service changed client list, add it... */
        if (gatt_is_bda_in_the_srv_chg_clt_list(p_tcb->peer_bda) == NULL)
        {
            if (btm_sec_is_a_bonded_dev(p_tcb->peer_bda) &&
                btm_sec_is_le_capable_dev(p_tcb->peer_bda))
        {
                gatt_add_a_bonded_dev_for_srv_chg(p_tcb->peer_bda);
        }