Merge branch 'bugfix/wps_reg_crash' into 'master'

fix(wifi): Add check before allocating eapol sm

See merge request espressif/esp-idf!43273
This commit is contained in:
Kapil Gupta
2026-01-17 11:03:06 +05:30
@@ -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) {