component/bt : fix bluetooth disable memory leak

This commit is contained in:
Tian Hao
2016-12-15 01:36:27 +08:00
parent 69ee1de9fa
commit aba262b18b

View File

@@ -2169,11 +2169,19 @@ void BTA_VendorCleanup (void)
#if (BLE_INCLUDED == TRUE && BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE) #if (BLE_INCLUDED == TRUE && BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE)
btm_ble_adv_filter_cleanup(); // when BLE_VND_INCLUDED is false, this function will be ignore, so move it out of "if" btm_ble_adv_filter_cleanup(); // when BLE_VND_INCLUDED is false, this function will be ignore, so move it out of "if"
#if BLE_PRIVACY_SPT == TRUE
btm_ble_resolving_list_cleanup (); //by TH, because cmn_ble_vsc_cb.max_filter has something mistake as btm_ble_adv_filter_cleanup
#endif
#if 0 //by TH, comment out temporarily
if (cmn_ble_vsc_cb.max_filter > 0) { if (cmn_ble_vsc_cb.max_filter > 0) {
btm_ble_adv_filter_cleanup();
#if BLE_PRIVACY_SPT == TRUE #if BLE_PRIVACY_SPT == TRUE
btm_ble_resolving_list_cleanup (); btm_ble_resolving_list_cleanup ();
#endif #endif
} }
#endif
if (cmn_ble_vsc_cb.tot_scan_results_strg > 0) { if (cmn_ble_vsc_cb.tot_scan_results_strg > 0) {
btm_ble_batchscan_cleanup(); btm_ble_batchscan_cleanup();