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

Commit 3f4f0301 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Andre Eisenbach
Browse files

Fix NPE in l2cble_notify_le_connection

Accessing p_lcb must be guarded with NULL check.

Bug: 31442085
Change-Id: I0f6e3f8e0247c5e8946c4d098f8a3ba442f5fb28
(cherry picked from commit b4458c93d5b5d7e2c103166d71daff560ee1a978)
parent 82598228
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -293,12 +293,14 @@ void l2cble_notify_le_connection (BD_ADDR bda)
        l2cu_process_fixed_chnl_resp (p_lcb);
    }

    if (p_lcb != NULL) {
        /* For all channels, send the event through their FSMs */
        for (p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; p_ccb = p_ccb->p_next_ccb)
        {
            if (p_ccb->chnl_state == CST_CLOSED)
                l2c_csm_execute (p_ccb, L2CEVT_LP_CONNECT_CFM, NULL);
        }
    }

    l2cble_use_preferred_conn_params(bda);
}