diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2014-04-09 13:12:09 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2014-04-11 10:53:52 +0300 |
commit | 56cd007ab83749b85670c9c7f560e083980c2ff4 (patch) | |
tree | bcad53e6e2595084a768154a8dff72f3814f8534 /src/network | |
parent | 781ca7a13feb01739a9aa8b629ff1ff7c51e74aa (diff) |
sd-ipv4ll: Add reference counting for IPv4LL
Similar to DHCP, the IPv4LL library user can decide to free the LL
client any time the callback is called. Guard against freeing the
LL client in the callback by introducing proper reference counting.
Also update code using the IPv4LL library to properly handle a
returned NULL from the notify and stop functions if the IPv4LL
client was freed.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-link.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 2630b4625a..684e1e5d3d 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -83,7 +83,7 @@ void link_free(Link *link) { sd_dhcp_client_unref(link->dhcp_client); sd_dhcp_lease_unref(link->dhcp_lease); - sd_ipv4ll_free(link->ipv4ll); + sd_ipv4ll_unref(link->ipv4ll); hashmap_remove(link->manager->links, &link->ifindex); |