diff options
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r-- | src/network/networkd-network.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index bc9304291e..24fc26b929 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -169,15 +169,8 @@ void network_free(Network *network) { free(network->description); free(network->dhcp_vendor_class_identifier); - while ((address = network->ntp)) { - LIST_REMOVE(addresses, network->ntp, address); - address_free(address); - } - - while ((address = network->dns)) { - LIST_REMOVE(addresses, network->dns, address); - address_free(address); - } + strv_free(network->ntp); + strv_free(network->dns); netdev_unref(network->bridge); |