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

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

See merge request espressif/esp-idf!45250
This commit is contained in:
Jiang Jiang Jian
2026-01-27 14:44:08 +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
*/
@@ -363,6 +363,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) {