diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-01 10:28:36 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-01 10:30:37 +0200 |
commit | 28aeb07f55ddf338c8705c002bde391cebbdc5a3 (patch) | |
tree | 16ced17cc8e41dc0515e99115251d7a2ca9b76d2 /src/network | |
parent | 54d61deb7bffec5ca22cf765b13afbb0af547868 (diff) |
networkd: link - drop assert from _free()
_free() should always succeed, even if object is not fully allocated.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-link.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index c99cafc24b..8674eee948 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -106,8 +106,6 @@ static void link_free(Link *link) { if (!link) return; - assert(link->manager); - while ((address = link->addresses)) { LIST_REMOVE(addresses, link->addresses, address); address_free(address); @@ -128,7 +126,8 @@ static void link_free(Link *link) { sd_dhcp6_client_unref(link->dhcp6_client); sd_icmp6_nd_unref(link->icmp6_router_discovery); - hashmap_remove(link->manager->links, &link->ifindex); + if (link->manager) + hashmap_remove(link->manager->links, &link->ifindex); free(link->ifname); |