summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-10-07 14:32:10 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-10-07 14:32:13 +0900
commitb3fac19f1b5f589fe1213b57ca19c06348480f67 (patch)
tree78413d23320752aec6eb4b81142fa29bb2a4d064 /src/network/networkd-link.c
parent44085d63f04127cbd2f15c11e672de4d024d91b2 (diff)
downloadsystemd-b3fac19f1b5f589fe1213b57ca19c06348480f67.tar.gz
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.c8
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);
}