From 4aaa2f8e0fd23b808c0fae0260225adf5d15e6fc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 27 Feb 2006 10:10:52 +0000 Subject: [PATCH] fixed memory leak --- amxmodx/modules.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 55e26040..9441921a 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -487,6 +487,10 @@ int unload_amxscript(AMX* amx, void** program) Handler *pHandler = (Handler *)amx->userdata[UD_HANDLER]; if (pHandler) delete pHandler; + + optimizer_s *opt = (optimizer_s *)amx->usertags[UT_OPTIMIZER]; + if (opt) + delete opt; CList::iterator a = g_loadedscripts.find(amx);