summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-07 15:03:51 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:19 +0200
commit9b6bf4d6120adfe8c631830dbe1c7c6c64e07ce5 (patch)
treeffb9a8f7532e80881f8be7f89ed5e7ee42e9a6f0 /net/wireless
parent4e9c3af398207d95957ae6c25290891574f2d7e8 (diff)
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: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 35fb2b0517d9..b75398f0d5b4 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10767,6 +10767,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
&bssid);
if (IS_ERR(req.links[link_id].bss)) {
err = PTR_ERR(req.links[link_id].bss);
+ req.links[link_id].bss = NULL;
goto free;
}