https://git.reactos.org/?p=reactos.git;a=commitdiff;h=87d3fdf99e8fa100b88af…
commit 87d3fdf99e8fa100b88af9983c15873212d9c148
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Thu Feb 22 11:28:55 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Thu Feb 22 11:53:34 2018 +0100
[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 44ed6953db..ab28782bf8 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;