mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fixed the crash of LoadProhibited caused by taht
the nodes are deleted during the traversal of the linked list
This commit is contained in:
parent
e6ad0a4fa2
commit
95b363aa91
@ -509,12 +509,14 @@ void btm_acl_device_down (void)
|
|||||||
{
|
{
|
||||||
tACL_CONN *p = NULL;
|
tACL_CONN *p = NULL;
|
||||||
BTM_TRACE_DEBUG ("btm_acl_device_down\n");
|
BTM_TRACE_DEBUG ("btm_acl_device_down\n");
|
||||||
for (list_node_t *p_node = list_begin(btm_cb.p_acl_db_list); p_node; p_node = list_next(p_node)) {
|
for (list_node_t *p_node = list_begin(btm_cb.p_acl_db_list); p_node;) {
|
||||||
p = list_node(p_node);
|
list_node_t *p_next = list_next(p_node);
|
||||||
if (p && p->in_use) {
|
p = list_node(p_node);
|
||||||
BTM_TRACE_DEBUG ("hci_handle=%d HCI_ERR_HW_FAILURE \n", p->hci_handle );
|
if (p && p->in_use) {
|
||||||
l2c_link_hci_disc_comp (p->hci_handle, HCI_ERR_HW_FAILURE);
|
BTM_TRACE_DEBUG ("hci_handle=%d HCI_ERR_HW_FAILURE \n", p->hci_handle );
|
||||||
}
|
l2c_link_hci_disc_comp (p->hci_handle, HCI_ERR_HW_FAILURE);
|
||||||
|
}
|
||||||
|
p_node = p_next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user