Commit 9b6bf4d6 authored by Johannes Berg's avatar Johannes Berg

wifi: nl80211: set BSS to NULL if IS_ERR()

If the BSS lookup returned an error, set it to NULL so we
don't try to free it.

Fixes: d648c230 ("wifi: nl80211: support MLO in auth/assoc")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4e9c3af3
...@@ -10767,6 +10767,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) ...@@ -10767,6 +10767,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
&bssid); &bssid);
if (IS_ERR(req.links[link_id].bss)) { if (IS_ERR(req.links[link_id].bss)) {
err = PTR_ERR(req.links[link_id].bss); err = PTR_ERR(req.links[link_id].bss);
req.links[link_id].bss = NULL;
goto free; goto free;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment