Merge branch 'bugfix/wpa3_sta_mem_leak_v5.2' into 'release/v5.2'

Fix a memory leak that occurs when SAE connection is interrupted (Backport v5.2)

See merge request espressif/esp-idf!31652
This commit is contained in:
Jiang Jiang Jian 2024-06-24 14:03:45 +08:00
commit 51bd0da552
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 9ddbd6cb0a46a96b475e1d8eaee6e43427ea2371
Subproject commit 1a39fdc745ad61cd119ca3fcd2c9e016b3c815d6

View File

@ -258,7 +258,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;
@ -272,6 +271,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();
}