3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

client: Make sure network_args.type is initialised

Otherwise match_by_device_and_args might segfault.
This commit is contained in:
Andrew Zaborowski 2018-07-31 16:37:12 +02:00 committed by Denis Kenzior
parent 61bdb7e19f
commit 18e672fa2f

View File

@ -770,8 +770,7 @@ static enum cmd_status cmd_connect(const char *device_name,
return CMD_STATUS_INVALID_ARGS;
network_args.name = argv[0];
if (argc >= 2)
network_args.type = argv[1];
network_args.type = argc >= 2 ? argv[1] : NULL;
match = network_match_by_device_and_args(device_proxy, &network_args);
if (!match) {