gtworek / VolatileDataCollector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory leak issue

MrRooten opened this issue · comments

DnsRecordListFree only free the NULL, this may cause memory leak issue

BOOL
GetDnsCachedData(
__in IN LPWSTR Name,
__in IN WORD Type
)
{
/*
Other code
/
while (DnsRecord != NULL) {
/

Other code
*/
DnsRecord = DnsRecord->pNext;
}
// Problem
DnsRecordListFree(DnsRecord, TRUE);
// End of Problem
// Other code
return TRUE;
}

Will take a look, thank you! I hate such leaks, but I clearly missed this one.

Fixed, thanks again!