Message ID | 20210416094212.5de7d1676ad7.Ied283b0bc5f504845e7d6ab90626bdfa68bb3dc0@changeid |
---|---|
State | New |
Headers | show |
Series | cfg80211: scan: drop entry from hidden_list on overflow | expand |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 758eb7d2a706..caa8eafbd583 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -1751,6 +1751,8 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev, if (rdev->bss_entries >= bss_entries_limit && !cfg80211_bss_expire_oldest(rdev)) { + if (!list_empty(&new->hidden_list)) + list_del(&new->hidden_list); kfree(new); goto drop; }