From: Jouni Malinen Date: Sat, 20 Apr 2024 15:37:35 +0000 (+0300) Subject: Clear connect_without_scan on network profile removal X-Git-Tag: hostap_2_11~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bbe4822a6461bcd634e290ee347668da4317635;p=thirdparty%2Fhostap.git Clear connect_without_scan on network profile removal wpa_s->connect_without_scan could have been left pointing to invalid network when a network profile was removed. It seems to be possible for this to happen in some hwsim test case scenarios under specific timing, but the exact reason for this is not clear. In any case, this pointer needs to be cleared. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c index 6d5dbcc29..e967dc8ff 100644 --- a/wpa_supplicant/notify.c +++ b/wpa_supplicant/notify.c @@ -400,6 +400,8 @@ void wpas_notify_network_removed(struct wpa_supplicant *wpa_s, wpa_s->ml_connect_probe_ssid = NULL; wpa_s->ml_connect_probe_bss = NULL; } + if (wpa_s->connect_without_scan == ssid) + wpa_s->connect_without_scan = NULL; #if defined(CONFIG_SME) && defined(CONFIG_SAE) if (wpa_s->sme.ext_auth_wpa_ssid == ssid) wpa_s->sme.ext_auth_wpa_ssid = NULL;