X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnetwork%2Fnetworkd-network.c;h=12107c940604c4b0c498038f7690b2a14caa3885;hb=2dcf7ec6ec0c28297311108acba119cd6e055e64;hp=2a68d3ec50f63fd5e4c772ea3326cb01c3751be0;hpb=3d3d425547a3f38473fcf8737b85dfebb630479d;p=elogind.git diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 2a68d3ec5..12107c940 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -77,10 +77,6 @@ static int network_load_one(Manager *manager, const char *filename) { if (!network->routes_by_section) return log_oom(); - network->dns = set_new(NULL, NULL); - if (!network->dns) - return log_oom(); - network->filename = strdup(filename); if (!network->filename) return log_oom(); @@ -164,10 +160,10 @@ void network_free(Network *network) { free(network->description); - SET_FOREACH(address, network->dns, i) + while ((address = network->dns)) { + LIST_REMOVE(addresses, network->dns, address); address_free(address); - - set_free(network->dns); + } netdev_unref(network->bridge);