Skip to content

Commit 51bd0da

Browse files
committed
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
2 parents 1a48173 + 8b0895e commit 51bd0da

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)