summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-network.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 803fcdd609..fc62395217 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -172,8 +172,10 @@ void network_free(Network *network) {
netdev_unref(network->bond);
- HASHMAP_FOREACH(netdev, network->stacked_netdevs, i)
+ HASHMAP_FOREACH(netdev, network->stacked_netdevs, i) {
+ hashmap_remove(network->stacked_netdevs, netdev->ifname);
netdev_unref(netdev);
+ }
hashmap_free(network->stacked_netdevs);
while ((route = network->static_routes))