From a608d46ea255f56c8aac9ae2c495fd235e0a064e Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Fri, 16 Jan 2026 13:12:46 +0530 Subject: [PATCH] fix(esp_wifi): Reallocate eapol sm if older sta struct is used --- components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c index b248f1da26..fd5293d979 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c @@ -385,6 +385,10 @@ static bool hostap_sta_join(void **sta, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len, u8 wpa_printf(MSG_ERROR, "failed to add station " MACSTR, MAC2STR(bssid)); goto fail; } +#ifdef CONFIG_WPS_REGISTRAR + } else { + ieee802_1x_free_station(hapd, sta_info); +#endif } #ifdef CONFIG_SAE if (sta_info->lock && os_semphr_take(sta_info->lock, 0) != TRUE) {