More consistent sta pointer checks in handle_assoc()

Verify that sta is not NULL before calling
hostapd_process_assoc_ml_info() that references this parameter. In
theory, sta might be NULL here if addition of the STA entry failed in
the 60 GHz case.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2023-12-17 00:12:59 +02:00
parent 29f38ebcf6
commit 656cf50d8b

View file

@ -5582,7 +5582,9 @@ static void handle_assoc(struct hostapd_data *hapd,
* issues with processing other non-Data Class 3 frames during this
* window.
*/
hostapd_process_assoc_ml_info(hapd, sta, pos, left, reassoc, resp);
if (sta)
hostapd_process_assoc_ml_info(hapd, sta, pos, left, reassoc,
resp);
if (resp == WLAN_STATUS_SUCCESS && sta &&
add_associated_sta(hapd, sta, reassoc))