mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +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:
parent
4d9f07b492
commit
b1e1238fb3
@ -708,7 +708,8 @@ static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply,
|
||||
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 = lease;
|
||||
|
Loading…
Reference in New Issue
Block a user