fix vendor hci memory leak

This commit is contained in:
zwj 2020-09-17 14:32:27 +08:00 committed by bot
parent 33c4e7f953
commit 712feb1e81
2 changed files with 9 additions and 7 deletions

View File

@ -2588,9 +2588,7 @@ void BTA_VendorCleanup (void)
}
#endif
if (cmn_ble_vsc_cb.adv_inst_max > 0) {
btm_ble_multi_adv_cleanup();
}
}
#endif

View File

@ -840,10 +840,14 @@ void btm_ble_multi_adv_cleanup(void)
}
#if BTM_DYNAMIC_MEMORY == TRUE
if(btm_multi_adv_cb_ptr) {
osi_free(btm_multi_adv_cb_ptr);
osi_free(btm_multi_adv_idx_q_ptr);
btm_multi_adv_cb_ptr = NULL;
}
if(btm_multi_adv_idx_q_ptr) {
osi_free(btm_multi_adv_idx_q_ptr);
btm_multi_adv_idx_q_ptr = NULL;
}
#endif
}