mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
component/bt: Fix mem leak of bt
This commit is contained in:
parent
7e870aefdb
commit
0519a73334
@ -1847,6 +1847,8 @@ void bta_av_dereg_comp(tBTA_AV_DATA *p_data)
|
|||||||
|
|
||||||
/* make sure that the timer is not active */
|
/* make sure that the timer is not active */
|
||||||
bta_sys_stop_timer(&p_scb->timer);
|
bta_sys_stop_timer(&p_scb->timer);
|
||||||
|
list_free(p_scb->a2d_list);
|
||||||
|
p_scb->a2d_list = NULL;
|
||||||
utl_freebuf((void **)&p_cb->p_scb[p_scb->hdi]);
|
utl_freebuf((void **)&p_cb->p_scb[p_scb->hdi]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,7 +273,10 @@ error_exit:;
|
|||||||
vQueueDelete(btc_aa_snk_ctrl_queue);
|
vQueueDelete(btc_aa_snk_ctrl_queue);
|
||||||
btc_aa_snk_ctrl_queue = NULL;
|
btc_aa_snk_ctrl_queue = NULL;
|
||||||
}
|
}
|
||||||
|
if (btc_aa_snk_queue_set) {
|
||||||
|
vQueueDelete(btc_aa_snk_queue_set);
|
||||||
|
btc_aa_snk_queue_set = NULL;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,6 +295,9 @@ void btc_a2dp_sink_shutdown(void)
|
|||||||
|
|
||||||
vQueueDelete(btc_aa_snk_ctrl_queue);
|
vQueueDelete(btc_aa_snk_ctrl_queue);
|
||||||
btc_aa_snk_ctrl_queue = NULL;
|
btc_aa_snk_ctrl_queue = NULL;
|
||||||
|
|
||||||
|
vQueueDelete(btc_aa_snk_queue_set);
|
||||||
|
btc_aa_snk_queue_set = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -348,7 +348,10 @@ error_exit:;
|
|||||||
vQueueDelete(btc_aa_src_ctrl_queue);
|
vQueueDelete(btc_aa_src_ctrl_queue);
|
||||||
btc_aa_src_ctrl_queue = NULL;
|
btc_aa_src_ctrl_queue = NULL;
|
||||||
}
|
}
|
||||||
|
if (btc_aa_src_queue_set) {
|
||||||
|
vQueueDelete(btc_aa_src_queue_set);
|
||||||
|
btc_aa_src_queue_set = NULL;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,6 +370,9 @@ void btc_a2dp_source_shutdown(void)
|
|||||||
|
|
||||||
vQueueDelete(btc_aa_src_ctrl_queue);
|
vQueueDelete(btc_aa_src_ctrl_queue);
|
||||||
btc_aa_src_ctrl_queue = NULL;
|
btc_aa_src_ctrl_queue = NULL;
|
||||||
|
|
||||||
|
vQueueDelete(btc_aa_src_queue_set);
|
||||||
|
btc_aa_src_queue_set = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -96,7 +96,7 @@ static void bt_app_task_handler(void *arg)
|
|||||||
void bt_app_task_start_up(void)
|
void bt_app_task_start_up(void)
|
||||||
{
|
{
|
||||||
bt_app_task_queue = xQueueCreate(10, sizeof(bt_app_msg_t));
|
bt_app_task_queue = xQueueCreate(10, sizeof(bt_app_msg_t));
|
||||||
xTaskCreate(bt_app_task_handler, "BtAppT", 2048, NULL, configMAX_PRIORITIES - 3, bt_app_task_handle);
|
xTaskCreate(bt_app_task_handler, "BtAppT", 2048, NULL, configMAX_PRIORITIES - 3, &bt_app_task_handle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ static void bt_app_task_handler(void *arg)
|
|||||||
void bt_app_task_start_up(void)
|
void bt_app_task_start_up(void)
|
||||||
{
|
{
|
||||||
bt_app_task_queue = xQueueCreate(10, sizeof(bt_app_msg_t));
|
bt_app_task_queue = xQueueCreate(10, sizeof(bt_app_msg_t));
|
||||||
xTaskCreate(bt_app_task_handler, "BtAppT", 2048, NULL, configMAX_PRIORITIES - 3, bt_app_task_handle);
|
xTaskCreate(bt_app_task_handler, "BtAppT", 2048, NULL, configMAX_PRIORITIES - 3, &bt_app_task_handle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user