From 87d3fdf99e8fa100b88af9983c15873212d9c148 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Thu, 22 Feb 2018 11:28:55 +0100 Subject: [PATCH 1/1] [DHCPCSVC] Fix a memory leak in bind_lease introduced in r14645 (!). CORE-14353 --- base/services/dhcpcsvc/dhcp/dhclient.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/services/dhcpcsvc/dhcp/dhclient.c b/base/services/dhcpcsvc/dhcp/dhclient.c index 44ed6953dbb..ab28782bf86 100644 --- a/base/services/dhcpcsvc/dhcp/dhclient.c +++ b/base/services/dhcpcsvc/dhcp/dhclient.c @@ -595,6 +595,10 @@ bind_lease(struct interface_info *ip) /* Remember the medium. */ ip->client->new->medium = ip->client->medium; + + /* Replace the old active lease with the new one. */ + if (ip->client->active) + free_client_lease(ip->client->active); ip->client->active = ip->client->new; ip->client->new = NULL; -- 2.17.1