diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-07 07:32:10 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-07 07:32:13 +0200 |
commit | b3fac19f1b5f589fe1213b57ca19c06348480f67 (patch) | |
tree | 78413d23320752aec6eb4b81142fa29bb2a4d064 /src/network/networkd-link.c | |
parent | network: drop unnecessary call of ndisc_vacuum() (diff) | |
download | systemd-b3fac19f1b5f589fe1213b57ca19c06348480f67.tar.xz systemd-b3fac19f1b5f589fe1213b57ca19c06348480f67.zip |
network: free timer event source for NDisc when link is freed
Though, it should be already freed already freed in link_stop_engines()
-> ndisc_stop(). Just for safety.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 69d5eb9d1b..00e4e451ef 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -151,6 +151,7 @@ static void link_free_engines(Link *link) { return; link->dhcp_server = sd_dhcp_server_unref(link->dhcp_server); + link->dhcp_client = sd_dhcp_client_unref(link->dhcp_client); link->dhcp_lease = sd_dhcp_lease_unref(link->dhcp_lease); link->dhcp4_6rd_tunnel_name = mfree(link->dhcp4_6rd_tunnel_name); @@ -158,12 +159,15 @@ static void link_free_engines(Link *link) { link->lldp_rx = sd_lldp_rx_unref(link->lldp_rx); link->lldp_tx = sd_lldp_tx_unref(link->lldp_tx); - ndisc_flush(link); - link->ipv4ll = sd_ipv4ll_unref(link->ipv4ll); + link->dhcp6_client = sd_dhcp6_client_unref(link->dhcp6_client); link->dhcp6_lease = sd_dhcp6_lease_unref(link->dhcp6_lease); + link->ndisc = sd_ndisc_unref(link->ndisc); + link->ndisc_expire = sd_event_source_disable_unref(link->ndisc_expire); + ndisc_flush(link); + link->radv = sd_radv_unref(link->radv); } |