forked from espressif/esp-idf
ble(fix): Fixed the issue of not returning memory to the memory pool after deinit callout
ble(fix): Fixed the issue of not returning memory to the memory pool after deinit callout
This commit is contained in:
@@ -719,10 +719,10 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
|
|
||||||
controller_sleep_deinit();
|
controller_sleep_deinit();
|
||||||
|
|
||||||
|
ble_controller_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_log_deinit_async();
|
ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_controller_deinit();
|
|
||||||
|
|
||||||
periph_module_disable(PERIPH_BT_MODULE);
|
periph_module_disable(PERIPH_BT_MODULE);
|
||||||
|
|
||||||
|
@@ -861,10 +861,10 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||||
|
|
||||||
|
ble_controller_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_log_deinit_async();
|
ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_controller_deinit();
|
|
||||||
|
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
/* De-initialize default event queue */
|
/* De-initialize default event queue */
|
||||||
|
@@ -840,10 +840,10 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||||
|
|
||||||
|
ble_controller_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_log_deinit_async();
|
ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_controller_deinit();
|
|
||||||
|
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
/* De-initialize default event queue */
|
/* De-initialize default event queue */
|
||||||
|
Submodule components/bt/controller/lib_esp32c2/esp32c2-bt-lib updated: ea33fbad1f...11c11f187f
@@ -720,12 +720,12 @@ npl_freertos_callout_deinit(struct ble_npl_callout *co)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
xTimerDelete(callout->handle, portMAX_DELAY);
|
xTimerDelete(callout->handle, portMAX_DELAY);
|
||||||
|
#endif // BLE_NPL_USE_ESP_TIMER
|
||||||
#if OS_MEM_ALLOC
|
#if OS_MEM_ALLOC
|
||||||
os_memblock_put(&ble_freertos_co_pool,callout);
|
os_memblock_put(&ble_freertos_co_pool,callout);
|
||||||
#else
|
#else
|
||||||
free((void *)callout);
|
free((void *)callout);
|
||||||
#endif // OS_MEM_ALLOC
|
#endif // OS_MEM_ALLOC
|
||||||
#endif // BLE_NPL_USE_ESP_TIMER
|
|
||||||
co->co = NULL;
|
co->co = NULL;
|
||||||
memset(co, 0, sizeof(struct ble_npl_callout));
|
memset(co, 0, sizeof(struct ble_npl_callout));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user