diff options
author | Jaehyun Kim <jeik01.kim@samsung.com> | 2022-01-07 12:12:15 +0900 |
---|---|---|
committer | Jaehyun Kim <jeik01.kim@samsung.com> | 2022-01-07 12:20:30 +0900 |
commit | 67014112bc78a2b6fa7857bf637ce646fa61cb75 (patch) | |
tree | 3ca353f8818a19d0870605209c5e87f6603fe6d8 | |
parent | 664e356ee119cc6a7650610518fa341d1a1f5ca5 (diff) | |
download | connman-submit/tizen/20220111.044041.tar.gz connman-submit/tizen/20220111.044041.tar.bz2 connman-submit/tizen/20220111.044041.zip |
Fix dereference after null checksubmit/tizen/20220111.044041accepted/tizen/unified/20220114.130209
Change-Id: If0c7f97ce58436c6cce1debf92f2fafb407ff9fe
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rwxr-xr-x | plugins/wifi.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 7c159963..3b709d87 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -2282,7 +2282,10 @@ static void scan_callback(int result, GSupplicantInterface *interface, connman_device_unref(device); #if defined TIZEN_EXT - if (wifi && wifi->scan_pending_network && result != -EIO) { + if (!wifi) + goto done; + + if (wifi->scan_pending_network && result != -EIO) { network_connect(wifi->scan_pending_network); wifi->scan_pending_network = NULL; connman_network_set_connecting(wifi->network); @@ -4156,9 +4159,10 @@ static void signalpoll_callback(int result, int maxspeed, int strength, if (need_bss_transition(freq, snr, strength)) { device = connman_network_get_device(network); - if (device) - interface = connman_device_get_string(device, "Interface"); + if (!device) + goto done; + interface = connman_device_get_string(device, "Interface"); bssid = connman_network_get_bssid(network); snprintf(bssid_str, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(bssid)); __connman_technology_notify_roaming_state(interface, "required", bssid_str, NULL); |