Skip to content

Commit

Permalink
Merge branch 'bugfix/crash_after_bluedroid_deinit_v4.4' into 'release…
Browse files Browse the repository at this point in the history
…/v4.4'

fix(bt/bluedroid): Fixed controller using null pointer after bluedroid deinit(v4.4)

See merge request espressif/esp-idf!30330
  • Loading branch information
wmy-espressif committed Apr 19, 2024
2 parents d1f549f + 0e31aae commit 0f65165
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/bt/host/bluedroid/hci/hci_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ void hci_shut_down(void)

bool hci_downstream_data_post(uint32_t timeout)
{
if (hci_host_env.downstream_data_ready == NULL) {
HCI_TRACE_WARNING("%s downstream_data_ready event not created", __func__);
return false;
}
return osi_thread_post_event(hci_host_env.downstream_data_ready, timeout);
}

Expand Down Expand Up @@ -259,7 +263,7 @@ static void transmit_command(
// in case the upper layer didn't already
command->event = MSG_STACK_TO_HC_HCI_CMD;

HCI_TRACE_DEBUG("HCI Enqueue Comamnd opcode=0x%x\n", metadata->opcode);
HCI_TRACE_DEBUG("HCI Enqueue Command opcode=0x%x\n", metadata->opcode);
BTTRC_DUMP_BUFFER(NULL, command->data + command->offset, command->len);

fixed_pkt_queue_enqueue(hci_host_env.command_queue, linked_pkt, FIXED_PKT_QUEUE_MAX_TIMEOUT);
Expand Down

0 comments on commit 0f65165

Please sign in to comment.