rtl8188eu: Prevent crash when ssids is NULL

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2023-04-10 12:23:27 -05:00
parent 57bd21c563
commit b5d64670e9

View file

@ -2285,7 +2285,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
#ifdef CONFIG_P2P
if (pwdinfo->driver_interface == DRIVER_CFG80211) {
if (!memcmp(ssids->ssid, "DIRECT-", 7) &&
if (ssids && !memcmp(ssids->ssid, "DIRECT-", 7) &&
rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL)) {
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);