Page 1 of 1

esp_wifi_deinit() doesn't return all memory

Posted: Tue Nov 19, 2019 1:20 am
by RobMeades
I have an application where I would like to initialise and then deinitialise Wifi, getting all the resources back. However, esp_wifi_deinit() doesn't clean up properly: it calls esp_supplicant_init() which allocates a block of 60 bytes of memory and calls esp_wifi_register_wpa_cb_internal() with it; the corresponding esp_wifi_unregister_wpa_cb_internal() is never called by anything and is an internal API to the wpa_supplicant component so I can't call it myself.

Can anyone advise how this is meant to work?