mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(wpa_supplicant): fix memory leak on SAE commit queue post failure
In auth_sae_queue(), when wpa3_hostap_post_evt() fails, the queued entry was left on the list and never freed. This leaks memory under SAE commit floods or when the event queue is full. Free the entry and remove it from the list on post failure.
This commit is contained in:
@@ -730,6 +730,8 @@ queued:
|
||||
/* posting event to the task to handle commit */
|
||||
if (wpa3_hostap_post_evt(SIG_WPA3_RX_COMMIT, 0) != 0) {
|
||||
wpa_printf(MSG_ERROR, "failed to queue commit build event");
|
||||
dl_list_del(&q->list);
|
||||
os_free(q);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user