mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
component/bt: reset the p_cmd_list pointer after release the mem.
This commit is contained in:
@ -312,6 +312,7 @@ void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB *p_clcb)
|
|||||||
// don't forget to clear the command queue before dealloc the clcb.
|
// don't forget to clear the command queue before dealloc the clcb.
|
||||||
list_clear(p_clcb->p_cmd_list);
|
list_clear(p_clcb->p_cmd_list);
|
||||||
osi_free((void *)p_clcb->p_cmd_list);
|
osi_free((void *)p_clcb->p_cmd_list);
|
||||||
|
p_clcb->p_cmd_list = NULL;
|
||||||
//osi_free_and_reset((void **)&p_clcb->p_q_cmd);
|
//osi_free_and_reset((void **)&p_clcb->p_q_cmd);
|
||||||
memset(p_clcb, 0, sizeof(tBTA_GATTC_CLCB));
|
memset(p_clcb, 0, sizeof(tBTA_GATTC_CLCB));
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user