1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-12 09:17:44 +03:00

network: remove DHCP lease and LLDP state file on link_free()

This commit is contained in:
Yu Watanabe 2021-03-03 16:31:28 +09:00
parent ab7153b3f4
commit a34e58d445

View File

@ -546,8 +546,6 @@ static Link *link_free(Link *link) {
link->ndisc_addresses = set_free(link->ndisc_addresses); link->ndisc_addresses = set_free(link->ndisc_addresses);
link_free_engines(link); link_free_engines(link);
free(link->lease_file);
free(link->lldp_file);
free(link->ifname); free(link->ifname);
strv_free(link->alternative_names); strv_free(link->alternative_names);
@ -555,8 +553,9 @@ static Link *link_free(Link *link) {
free(link->ssid); free(link->ssid);
free(link->driver); free(link->driver);
(void) unlink(link->state_file); unlink_and_free(link->lease_file);
free(link->state_file); unlink_and_free(link->lldp_file);
unlink_and_free(link->state_file);
sd_device_unref(link->sd_device); sd_device_unref(link->sd_device);