mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-18 10:31:09 +00:00
fix ble connect crash
This commit is contained in:
committed by
zwj
parent
1d1754e4b4
commit
d4619584d7
@@ -888,12 +888,27 @@ void l2c_init (void)
|
||||
l2ble_update_att_acl_pkt_num(L2CA_BUFF_INI, NULL);
|
||||
#endif
|
||||
}
|
||||
void l2c_free_p_lcb_pool(void)
|
||||
{
|
||||
list_node_t *p_node = NULL;
|
||||
tL2C_LCB *p_lcb = NULL;
|
||||
for (p_node = list_begin(l2cb.p_lcb_pool); p_node; p_node = list_next(p_node)) {
|
||||
p_lcb = list_node(p_node);
|
||||
if (p_lcb) {
|
||||
l2cu_release_lcb (p_lcb);
|
||||
list_remove(l2cb.p_lcb_pool, p_lcb);
|
||||
osi_free(p_lcb);
|
||||
}
|
||||
}
|
||||
|
||||
list_free(l2cb.p_lcb_pool);
|
||||
}
|
||||
|
||||
void l2c_free(void)
|
||||
{
|
||||
list_free(l2cb.rcv_pending_q);
|
||||
l2cb.rcv_pending_q = NULL;
|
||||
list_free(l2cb.p_lcb_pool);
|
||||
l2c_free_p_lcb_pool();
|
||||
list_free(l2cb.p_ccb_pool);
|
||||
#if L2C_DYNAMIC_MEMORY
|
||||
FREE_AND_RESET(l2c_cb_ptr);
|
||||
|
||||
Reference in New Issue
Block a user