mirror of
https://github.com/systemd/systemd.git
synced 2025-08-30 05:49:54 +03:00
networkd: don't clear dhcpv6 lease timers if there's no previous lease
If client->lease is NULL, dhcp6_lease_clear_timers will cause a segmentation fault.
This commit is contained in:
committed by
Tom Gundersen
parent
4d9f07b492
commit
b1e1238fb3
@ -708,7 +708,8 @@ static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dhcp6_lease_clear_timers(&client->lease->ia);
|
if (client->lease)
|
||||||
|
dhcp6_lease_clear_timers(&client->lease->ia);
|
||||||
|
|
||||||
client->lease = sd_dhcp6_lease_unref(client->lease);
|
client->lease = sd_dhcp6_lease_unref(client->lease);
|
||||||
client->lease = lease;
|
client->lease = lease;
|
||||||
|
Reference in New Issue
Block a user