mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
sd-dhcp-server: fix possible double-free or use-after-free
This commit is contained in:
parent
cedf6a8da5
commit
3dc8fb0eb8
@ -1105,7 +1105,7 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message, siz
|
||||
|
||||
if (server->bound_leases[pool_offset] == existing_lease) {
|
||||
server->bound_leases[pool_offset] = NULL;
|
||||
hashmap_remove(server->leases_by_client_id, existing_lease);
|
||||
hashmap_remove(server->leases_by_client_id, &existing_lease->client_id);
|
||||
dhcp_lease_free(existing_lease);
|
||||
|
||||
if (server->callback)
|
||||
|
Loading…
Reference in New Issue
Block a user