Accessing p_lcb must be guarded with NULL check.
Bug:
31442085
Change-Id: I0f6e3f8e0247c5e8946c4d098f8a3ba442f5fb28
l2cu_process_fixed_chnl_resp (p_lcb);
}
l2cu_process_fixed_chnl_resp (p_lcb);
}
- /* 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);
+ 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);
}
l2cble_use_preferred_conn_params(bda);