1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

networkd: link - drop assert from _free()

_free() should always succeed, even if object is not fully allocated.
This commit is contained in:
Tom Gundersen 2014-07-01 10:28:36 +02:00
parent 54d61deb7b
commit 28aeb07f55

View File

@ -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);