cfg80211: scan: drop entry from hidden_list on overflow
authorJohannes Berg <johannes.berg@intel.com>
Fri, 16 Apr 2021 07:42:14 +0000 (09:42 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Apr 2021 11:25:50 +0000 (13:25 +0200)
commit010bfbe768f7ecc876ffba92db30432de4997e2a
treeeb24755fe5a83b47a21c8b4685723b13be09b68c
parent2f5164447cdab6419edddde3a214f93a53aa4e60
cfg80211: scan: drop entry from hidden_list on overflow

If we overflow the maximum number of BSS entries and free the
new entry, drop it from any hidden_list that it may have been
added to in the code above or in cfg80211_combine_bsses().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210416094212.5de7d1676ad7.Ied283b0bc5f504845e7d6ab90626bdfa68bb3dc0@changeid
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c