diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c index d1d107a3fe..f748787f0a 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c @@ -211,6 +211,7 @@ void *hostap_init(void) } #ifdef CONFIG_SAE + dl_list_init(&hapd->sae_commit_queue); auth_conf->sae_require_mfp = 1; #endif /* CONFIG_SAE */ @@ -263,7 +264,7 @@ void hostapd_cleanup(struct hostapd_data *hapd) struct hostapd_sae_commit_queue *q, *tmp; - if (dl_list_empty(&hapd->sae_commit_queue)) { + if (!dl_list_empty(&hapd->sae_commit_queue)) { dl_list_for_each_safe(q, tmp, &hapd->sae_commit_queue, struct hostapd_sae_commit_queue, list) { dl_list_del(&q->list); diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c index 21a7c4e379..5f351739bd 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c @@ -653,8 +653,6 @@ int wpa3_hostap_auth_init(void *data) return ESP_FAIL; } - struct hostapd_data *hapd = (struct hostapd_data *)data; - dl_list_init(&hapd->sae_commit_queue); return ESP_OK; }