fix(wifi): Free eapol sm before alloc for new connection

This commit is contained in:
Sajia
2025-11-12 10:13:41 +05:30
parent 1c37e7207f
commit df0b21d42c
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -370,6 +370,11 @@ static int check_n_add_wps_sta(struct hostapd_data *hapd, struct sta_info *sta_i
}
sta_info->wps_ie = wps_ie;
if (sta_info->eapol_sm) {
ieee802_1x_free_station(hapd, sta_info);
}
sta_info->eapol_sm = ieee802_1x_alloc_eapol_sm(hapd, sta_info);
if (sta_info->eapol_sm) {