fix(esp_wifi): Fix a memory leak that occurs when SAE connection is interrupted

1. Free temporary data used by SAE before memsetting the same
2. Drop any received auth response that uses a different algorithm than the one currently in use
This commit is contained in:
Shyamal Khachane
2024-06-21 16:38:27 +05:30
parent b7382c60f9
commit ff6db87429
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,6 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
case WIFI_REASON_ASSOC_FAIL:
case WIFI_REASON_CONNECTION_FAIL:
case WIFI_REASON_HANDSHAKE_TIMEOUT:
esp_wpa3_free_sae_data();
wpa_sta_clear_curr_pmksa();
wpa_sm_notify_disassoc(&gWpaSm);
break;
@ -267,6 +266,7 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
owe_deinit();
#endif /* CONFIG_OWE_STA */
esp_wpa3_free_sae_data();
supplicant_sta_disconn_handler();
}