fix(bt/bluedroid): Fixed invalid access to freed semaphore

This commit is contained in:
Jin Cheng 2023-08-24 19:58:52 +08:00
parent fbf2d5d5d9
commit 963f5a40db

View File

@ -275,14 +275,14 @@ void bt_app_send_data_shut_down(void)
vTaskDelete(s_bt_app_send_data_task_handler);
s_bt_app_send_data_task_handler = NULL;
}
if (s_send_data_Semaphore) {
vSemaphoreDelete(s_send_data_Semaphore);
s_send_data_Semaphore = NULL;
}
if(s_periodic_timer) {
ESP_ERROR_CHECK(esp_timer_stop(s_periodic_timer));
ESP_ERROR_CHECK(esp_timer_delete(s_periodic_timer));
}
if (s_send_data_Semaphore) {
vSemaphoreDelete(s_send_data_Semaphore);
s_send_data_Semaphore = NULL;
}
if (s_m_rb) {
vRingbufferDelete(s_m_rb);
}