mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
test-runner: Check radio_conf_list is not null
The option may be present but may not parse correctly as a list in which case has_hw_conf will be true but radio_conf_list will be NULL and we might crash.
This commit is contained in:
parent
fcd5b8b54f
commit
1462d68eb6
@ -1035,6 +1035,10 @@ static bool configure_hw_radios(struct l_settings *hw_settings,
|
||||
l_settings_get_string_list(hw_settings, HW_CONFIG_GROUP_SETUP,
|
||||
HW_CONFIG_SETUP_RADIO_CONFS,
|
||||
':');
|
||||
if (has_hw_conf && !radio_conf_list) {
|
||||
l_error("%s doesn't parse", HW_CONFIG_SETUP_RADIO_CONFS);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (has_hw_conf) {
|
||||
for (i = 0; radio_conf_list[i]; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user