From 98d3fb79d7992c81ddaec932a18e23381c01256d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 15 Aug 2005 21:38:03 +0000 Subject: [PATCH] Fixed some mmgr bugs --- amxmodx/modules.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 2d2d7485..60c1883a 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -597,7 +597,13 @@ int unload_amxscript(AMX* amx, void** program) CList::iterator a = g_loadedscripts.find( amx ); if ( a ) a.remove(); char *prg = (char *)*program; +#if defined __linux__ && defined JIT && defined MEMORY_TEST +#undef free + free(prg); +#define free(ptr) m_deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) +#else delete[] prg; +#endif *program = 0; return AMX_ERR_NONE; }