diff --git a/components/bt/host/bluedroid/stack/btu/btu_init.c b/components/bt/host/bluedroid/stack/btu/btu_init.c index 52ce3a6e15..80678bef82 100644 --- a/components/bt/host/bluedroid/stack/btu/btu_init.c +++ b/components/bt/host/bluedroid/stack/btu/btu_init.c @@ -129,12 +129,12 @@ void btu_free_core(void) #if (defined(GATT_INCLUDED) && GATT_INCLUDED == true) gatt_free(); #endif - btm_ble_free(); -#endif - btm_free(); #if SMP_INCLUDED == TRUE SMP_Free(); #endif + btm_ble_free(); +#endif + btm_free(); } /*****************************************************************************