wifi: nl80211: set BSS to NULL if IS_ERR()
authorJohannes Berg <johannes.berg@intel.com>
Thu, 7 Jul 2022 13:03:51 +0000 (15:03 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:19 +0000 (11:43 +0200)
commit9b6bf4d6120adfe8c631830dbe1c7c6c64e07ce5
treeffb9a8f7532e80881f8be7f89ed5e7ee42e9a6f0
parent4e9c3af398207d95957ae6c25290891574f2d7e8
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>
net/wireless/nl80211.c