3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 10:39:23 +01:00

station: check for duplicate frequencies in debug scan

This commit is contained in:
James Prestwood 2021-09-01 16:38:52 -07:00 committed by Denis Kenzior
parent 1b44527511
commit 3975e4eb6d

View File

@ -3980,6 +3980,9 @@ static struct l_dbus_message *station_debug_scan(struct l_dbus *dbus,
freq_set = scan_freq_set_new(); freq_set = scan_freq_set_new();
for (i = 0; i < freqs_len; i++) { for (i = 0; i < freqs_len; i++) {
if (scan_freq_set_contains(freq_set, (uint32_t)freqs[i]))
continue;
if (!scan_freq_set_add(freq_set, (uint32_t)freqs[i])) { if (!scan_freq_set_add(freq_set, (uint32_t)freqs[i])) {
scan_freq_set_free(freq_set); scan_freq_set_free(freq_set);
goto invalid_args; goto invalid_args;