Fix a DHook crash when unloading dynamic detours on x86_64 arch (#2288)

This commit is contained in:
rtldg
2025-02-28 21:33:55 +01:00
committed by GitHub
parent d5e05fae59
commit 87653bf780
+3
View File
@@ -88,10 +88,13 @@ CHook::~CHook()
m_Hook.disable();
}
// x64 will free these in the m_bridge/m_postCallback destructors.
#ifndef DYNAMICHOOKS_x86_64
if (m_pBridge) {
smutils->GetScriptingEngine()->FreePageMemory(m_pBridge);
smutils->GetScriptingEngine()->FreePageMemory(m_pNewRetAddr);
}
#endif
delete m_pRegisters;
delete m_pCallingConvention;