summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index d81a3bf630..e7753dc98c 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -112,6 +112,11 @@ static void link_free(Link *link) {
address_free(address);
}
+ while ((address = link->pool_addresses)) {
+ LIST_REMOVE(addresses, link->pool_addresses, address);
+ address_free(address);
+ }
+
sd_dhcp_client_unref(link->dhcp_client);
sd_dhcp_lease_unref(link->dhcp_lease);