Make sta NULL-check easier for static analyzers
sta == NULL check is already done above based on category != WLAN_ACTION_PUBLIC, but that seems to be too complex for some static analyzers, so avoid invalid reports by explicitly checking for this again in the WLAN_ACTION_FT case. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0bceb8d6f4
commit
d6c6b1fb9d
1 changed files with 2 additions and 1 deletions
|
@ -1626,7 +1626,8 @@ static int handle_action(struct hostapd_data *hapd,
|
|||
switch (mgmt->u.action.category) {
|
||||
#ifdef CONFIG_IEEE80211R
|
||||
case WLAN_ACTION_FT:
|
||||
if (wpa_ft_action_rx(sta->wpa_sm, (u8 *) &mgmt->u.action,
|
||||
if (!sta ||
|
||||
wpa_ft_action_rx(sta->wpa_sm, (u8 *) &mgmt->u.action,
|
||||
len - IEEE80211_HDRLEN))
|
||||
break;
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue