Skip to content

Commit cca744c

Browse files
author
Jiang Jiang Jian
committed
Merge branch 'bugfix/ag_data_callback_cleared_after_deinit' into 'master'
fix(bt): Fixed HFP AG data callback cleared after profile is re-initialized Closes COEXQABR25-79 See merge request espressif/esp-idf!39786
2 parents 9ddef27 + 0190ba0 commit cca744c

File tree

3 files changed

+189
-215
lines changed

3 files changed

+189
-215
lines changed

components/bt/common/btc/core/btc_task.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ static bt_status_t btc_init_mem(void) {
490490
#endif
491491

492492
#if BTC_HF_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
493-
if ((hf_local_param_ptr = (hf_local_param_t *)osi_malloc(BTC_HF_NUM_CB * sizeof(hf_local_param_t))) == NULL) {
493+
if ((hf_local_param_ptr = (hf_local_param_t *)osi_malloc(sizeof(hf_local_param_t))) == NULL) {
494494
goto error_exit;
495495
}
496-
memset((void *)hf_local_param_ptr, 0, BTC_HF_NUM_CB * sizeof(hf_local_param_t));
496+
memset((void *)hf_local_param_ptr, 0, sizeof(hf_local_param_t));
497497
#endif
498498

499499
#if BTC_HF_CLIENT_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE

0 commit comments

Comments
 (0)