| 644 | } |
| 645 | |
| 646 | static void DetourFreeUnusedTrampolineRegions() { |
| 647 | PDETOUR_REGION* ppRegionBase = &s_pRegions; |
| 648 | PDETOUR_REGION pRegion = s_pRegions; |
| 649 | |
| 650 | while (pRegion != NULL) { |
| 651 | if (DetourIsRegionEmpty(pRegion)) { |
| 652 | *ppRegionBase = pRegion->pNext; |
| 653 | SIZE_T size = 0; |
| 654 | ExFreePoolWithTag(pRegion, 'oted'); |
| 655 | s_pRegion = NULL; |
| 656 | } |
| 657 | else { |
| 658 | ppRegionBase = &pRegion->pNext; |
| 659 | } |
| 660 | pRegion = *ppRegionBase; |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | PVOID NTAPI DetourCodeFromPointer(_In_ PVOID pPointer, |
| 665 | _Out_opt_ PVOID* ppGlobals) { |
no test coverage detected