Skip to content

Commit 8b0895e

Browse files
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
1 parent 401816e commit 8b0895e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
258258
case WIFI_REASON_ASSOC_FAIL:
259259
case WIFI_REASON_CONNECTION_FAIL:
260260
case WIFI_REASON_HANDSHAKE_TIMEOUT:
261-
esp_wpa3_free_sae_data();
262261
wpa_sta_clear_curr_pmksa();
263262
wpa_sm_notify_disassoc(&gWpaSm);
264263
break;
@@ -272,6 +271,7 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
272271
owe_deinit();
273272
#endif /* CONFIG_OWE_STA */
274273

274+
esp_wpa3_free_sae_data();
275275
supplicant_sta_disconn_handler();
276276
}
277277

0 commit comments

Comments
 (0)