1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-18 11:54:14 +01:00

Fixed memory leak in TestMulti and one of two leaks in TestHookManGen

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40622
This commit is contained in:
Pavol Marko 2008-01-18 17:31:52 +00:00
parent 82ce7c9ada
commit ea7aefbda6
2 changed files with 2 additions and 1 deletions

View File

@ -1047,6 +1047,7 @@ namespace
// Test for high vtable indices
Hello *pHello = new Hello;
CAutoPtrDestruction<Hello> apdHello(pHello);
SourceHook::CProtoInfoBuilder helloPi(SourceHook::ProtoInfo::CallConv_ThisCall);
SourceHook::HookManagerPubFunc helloHM_4 = g_HMAGPtr->MakeHookMan(helloPi, 0, 4);
SourceHook::HookManagerPubFunc helloHM_79 = g_HMAGPtr->MakeHookMan(helloPi, 0, 79);

View File

@ -94,7 +94,7 @@ bool TestMulti(std::string &error)
}
}
for (unsigned int i=1; i<10; i++)
for (unsigned int i=0; i<10; i++)
{
SH_REMOVE_HOOK(VMultiTest, HookTarget, pv[1], SH_STATIC(HookFunction), false);
delete pv[i];