Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak issue #1

Closed
MrRooten opened this issue Mar 9, 2023 · 2 comments
Closed

Memory leak issue #1

MrRooten opened this issue Mar 9, 2023 · 2 comments

Comments

@MrRooten
Copy link

MrRooten commented Mar 9, 2023

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

@gtworek
Copy link
Owner

gtworek commented Mar 9, 2023

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

@gtworek
Copy link
Owner

gtworek commented Jun 30, 2023

Fixed, thanks again!

@gtworek gtworek closed this as completed Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants