}
g_variant_get(result, "(a{ss})", &iter);
- while (g_variant_iter_next(iter, "{ss}", &key, &value)) {
+ while (g_variant_iter_loop(iter, "{ss}", &key, &value)) {
if (g_strcmp0(key, "path") == 0) {
if (value != NULL)
g_strlcpy(ProfileInfo->ProfileName, value, NET_PROFILE_NAME_LEN_MAX);
else if (g_strcmp0(dns_type, "ipv6.dhcp") == 0)
net_info->DnsConfigType6 =
NET_DNS_CONFIG_TYPE_DYNAMIC;
+ g_free(dns_type);
}
}
- g_free(dns_type);
g_variant_iter_free(iter);
net_info->DnsCount = dnsCount;
else if (g_strcmp0(dns_type, "ipv6.dhcp") == 0)
net_info->DnsConfigType6 =
NET_DNS_CONFIG_TYPE_DYNAMIC;
+ g_free(dns_type);
}
}
- g_free(dns_type);
g_variant_iter_free(iter);
net_info->DnsCount = dnsCount;