[0.4.7][DHCPSVC/IPHLPAPI] Fix 2 memory leaks CORE-14353

that are triggered repeatedly when just idling on
the desktop and therefore will lure ros into
inevitable BSOD after some days.

fix cherry picked from 0.4.9-dev-52-g
87d3fdf99e

and 2nd fix cherry picked from 0.4.9-dev-50-g
182a31074f
This commit is contained in:
Joachim Henze 2020-10-02 11:57:47 +02:00
parent 3966ffa790
commit 5de8d5c559
2 changed files with 5 additions and 0 deletions

View file

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

View file

@ -397,6 +397,7 @@ DWORD getNumRoutes(void)
TRACE("numRoutes: %d\n", (int)numRoutes);
tdiFreeThingSet( entitySet );
closeTcpFile( tcpFile );
return numRoutes;