MLD STA: Fix crash caused by NULL wpa_s->current_ssid
For wpa_supplicant_get_new_bss(), wpa_s->current_ssid can be NULL in
some cases. Add a NULL check before accessing it to avoid NULL pointer
dereference errors.
Fixes: 7784964cbe
("MLD STA: Fetch MLO connection info into core wpa_supplicant")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
ef5a9a009d
commit
6f3efa21c2
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ static struct wpa_bss * wpa_supplicant_get_new_bss(
|
|||
struct wpa_bss *bss = NULL;
|
||||
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
||||
|
||||
if (ssid->ssid_len > 0)
|
||||
if (ssid && ssid->ssid_len > 0)
|
||||
bss = wpa_bss_get(wpa_s, bssid, ssid->ssid, ssid->ssid_len);
|
||||
if (!bss)
|
||||
bss = wpa_bss_get_bssid(wpa_s, bssid);
|
||||
|
|
Loading…
Reference in a new issue