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

Commit 774d5fe1 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android Partner Code Review
Browse files

Merge "Avoid null-pointer dereference in l2c_release_lcb()" into m-wireless-dev

parents eefd19c8 da2a0234
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -214,7 +214,10 @@ void l2cu_release_lcb (tL2C_LCB *p_lcb)
#else
        btm_acl_removed (p_lcb->remote_bd_addr, BT_TRANSPORT_BR_EDR);
#endif

    /* Release any held buffers */
    if (p_lcb->link_xmit_data_q)
    {
        while (!list_is_empty(p_lcb->link_xmit_data_q)) {
            BT_HDR *p_buf = list_front(p_lcb->link_xmit_data_q);
            list_remove(p_lcb->link_xmit_data_q, p_buf);
@@ -222,6 +225,7 @@ void l2cu_release_lcb (tL2C_LCB *p_lcb)
        }
        list_free(p_lcb->link_xmit_data_q);
        p_lcb->link_xmit_data_q = NULL;
    }

#if (L2CAP_UCD_INCLUDED == TRUE)
    /* clean up any security pending UCD */