1
1
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:
Yu Watanabe 2021-08-11 16:20:35 +09:00
parent cedf6a8da5
commit 3dc8fb0eb8

View File

@ -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)