From 656cf50d8b3adcce7d4d40cf0bae233857eabd07 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 17 Dec 2023 00:12:59 +0200 Subject: [PATCH] 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 --- src/ap/ieee802_11.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index fe5084c26..8fb6ce5d3 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -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))