mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 13:00:19 +00:00
wifi: Fix race conditon invoking invalid callback on deinit
Closes https://github.com/espressif/esp-idf/issues/7579
This commit is contained in:
@@ -83,6 +83,11 @@ static esp_err_t wifi_driver_start(esp_netif_t * esp_netif, void * args)
|
||||
|
||||
void esp_wifi_destroy_if_driver(wifi_netif_driver_t h)
|
||||
{
|
||||
if (h) {
|
||||
esp_wifi_internal_reg_rxcb(h->wifi_if, NULL); // ignore the potential error
|
||||
// as the wifi might have been already uninitialized
|
||||
s_wifi_netifs[h->wifi_if] = NULL;
|
||||
}
|
||||
free(h);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user