Merge branch 'bugfix/wps_reg_crash_v5.5' into 'release/v5.5'

fix(wifi): Add check before allocating eapol sm (v5.5)

See merge request espressif/esp-idf!45248
This commit is contained in:
Jiang Jiang Jian
2026-01-20 11:43:05 +08:00
@@ -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) {