diff options
Diffstat (limited to 'gsupplicant')
-rwxr-xr-x | gsupplicant/supplicant.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 1852c45f..8c5cebf4 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -6663,16 +6663,10 @@ static void set_band_freqs(GSupplicantScanParams *scan_data) switch (wifi_band_selection_method) { case WIFI_BAND_SELECTION_2_4GHZ: - if (!set_band_freqs_2_4ghz(scan_data)) { - g_free(scan_data); - return; - } + set_band_freqs_2_4ghz(scan_data); break; case WIFI_BAND_SELECTION_5GHZ: - if (!set_band_freqs_5ghz(scan_data)) { - g_free(scan_data); - return; - } + set_band_freqs_5ghz(scan_data); break; case WIFI_BAND_SELECTION_6GHZ: /* Currently not supported */ @@ -6718,6 +6712,12 @@ int g_supplicant_interface_scan(GSupplicantInterface *interface, } else { set_band_freqs(scan_data_local); print_scan_freqs(scan_data_local); + + if (scan_data_local->num_freqs == 0) { + g_free(scan_data_local); + scan_data_local = NULL; + } + data->scan_params = scan_data_local; } } |