Merge branch 'bugfix/btdm_fix_notify_memory_leak_for_v30' into 'release/v3.0'

Component/bt: fix notify memory leak for v3.0

See merge request idf/esp-idf!2437
This commit is contained in:
Jiang Jiang Jian 2018-05-28 10:23:16 +08:00
commit dc304fb3af
2 changed files with 5 additions and 0 deletions

View file

@ -41,7 +41,9 @@ static void btc_enable_bluetooth(void)
static void btc_disable_bluetooth(void) static void btc_disable_bluetooth(void)
{ {
#if (SMP_INCLUDED)
btc_config_shut_down(); btc_config_shut_down();
#endif /* #if (SMP_INCLUDED) */
if (BTA_DisableBluetooth() != BTA_SUCCESS) { if (BTA_DisableBluetooth() != BTA_SUCCESS) {
future_ready(*btc_main_get_future_p(BTC_MAIN_DISABLE_FUTURE), FUTURE_FAIL); future_ready(*btc_main_get_future_p(BTC_MAIN_DISABLE_FUTURE), FUTURE_FAIL);
} }

View file

@ -209,6 +209,9 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
break; break;
case BTA_GATTS_CONF_EVT: case BTA_GATTS_CONF_EVT:
LOG_DEBUG("CONIRM EVT\n"); LOG_DEBUG("CONIRM EVT\n");
if (p_data && p_data->req_data.value){
osi_free(p_data->req_data.value);
}
/* Nothing */ /* Nothing */
break; break;
case BTA_GATTS_CREATE_EVT: case BTA_GATTS_CREATE_EVT: