mirror of
https://github.com/netero1010/EDRSilencer.git
synced 2026-06-08 09:05:23 +00:00
memory leak in GetProviderGUIDByDescription
memory allocation is not freed if a match is found in the loop, leading to a memory leak
This commit is contained in:
@@ -218,11 +218,13 @@ BOOL GetProviderGUIDByDescription(PCWSTR providerDescription, GUID* outProviderG
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL found = FALSE;
|
||||
for (UINT32 i = 0; i < numProviders; i++) {
|
||||
if (providers[i]->displayData.description != NULL) {
|
||||
if (wcscmp(providers[i]->displayData.description, providerDescription) == 0) {
|
||||
*outProviderGUID = providers[i]->providerKey;
|
||||
return TRUE;
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,5 +235,5 @@ BOOL GetProviderGUIDByDescription(PCWSTR providerDescription, GUID* outProviderG
|
||||
|
||||
FwpmProviderDestroyEnumHandle0(hEngine, enumHandle);
|
||||
FwpmEngineClose0(hEngine);
|
||||
return FALSE;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user