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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
			}