systemd,dhcpv6: clean up the lease on client reset

Upstream systemd.git commit 4e3e667 [sd-dhcp6-client: Fix unreferencing
DHCPv6 lease on client reset].

Fixed on master already.

https://bugzilla.redhat.com/show_bug.cgi?id=1260727
This commit is contained in:
Lubomir Rintel 2015-10-08 14:55:36 +02:00
parent ac633f6f2e
commit 95e8b165a7

View file

@ -285,6 +285,11 @@ static void client_notify(sd_dhcp6_client *client, int event) {
static int client_reset(sd_dhcp6_client *client) {
assert_return(client, -EINVAL);
if (client->lease) {
dhcp6_lease_clear_timers(&client->lease->ia);
client->lease = sd_dhcp6_lease_unref(client->lease);
}
client->receive_message =
sd_event_source_unref(client->receive_message);