Merge branch 'bugfix/free_sae_commit_queue' into 'master'

fix(esp_wifi): Fix memory leak for sae commit queue

See merge request espressif/esp-idf!43431
This commit is contained in:
Jiang Jiang Jian
2026-02-05 14:13:15 +08:00
2 changed files with 2 additions and 3 deletions
@@ -229,6 +229,7 @@ void *hostap_init(void)
}
#ifdef CONFIG_SAE
dl_list_init(&hapd->sae_commit_queue);
auth_conf->sae_require_mfp = 1;
#endif /* CONFIG_SAE */
@@ -281,7 +282,7 @@ void hostapd_cleanup(struct hostapd_data *hapd)
struct hostapd_sae_commit_queue *q, *tmp;
if (dl_list_empty(&hapd->sae_commit_queue)) {
if (!dl_list_empty(&hapd->sae_commit_queue)) {
dl_list_for_each_safe(q, tmp, &hapd->sae_commit_queue,
struct hostapd_sae_commit_queue, list) {
dl_list_del(&q->list);
@@ -663,8 +663,6 @@ int wpa3_hostap_auth_init(void *data)
return ESP_FAIL;
}
struct hostapd_data *hapd = (struct hostapd_data *)data;
dl_list_init(&hapd->sae_commit_queue);
return ESP_OK;
}