Protect rtw_cfg80211_unlink_bss() against pnetwork of NULL

This commit is contained in:
kimocoder 2019-02-16 02:22:54 +01:00
parent eaf2707950
commit 4848f29d19

View File

@ -2525,7 +2525,11 @@ void rtw_cfg80211_unlink_bss(_adapter *padapter, struct wlan_network *pnetwork)
struct wireless_dev *pwdev = padapter->rtw_wdev;
struct wiphy *wiphy = pwdev->wiphy;
struct cfg80211_bss *bss = NULL;
WLAN_BSSID_EX select_network = pnetwork->network;
WLAN_BSSID_EX select_network;
if (!pnetwork)
return;
select_network = pnetwork->network;
bss = cfg80211_get_bss(wiphy, NULL /*notify_channel*/,
select_network.MacAddress, select_network.Ssid.Ssid,