From d51aaec97d52c16aaeb3600854eecd6d4b3856aa Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Tue, 2 Dec 2008 10:57:42 -0600 Subject: [PATCH] Fixed a memory leak that occurred when a ConCmdIter handle was closed. (L4D engine) Note: These handles are used by the FindFirstConCommand and FindNextConCommand natives. --- core/smn_console.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/smn_console.cpp b/core/smn_console.cpp index 5ee3a344..a210fdd5 100644 --- a/core/smn_console.cpp +++ b/core/smn_console.cpp @@ -101,6 +101,10 @@ public: else if (type == htConCmdIter) { ConCmdIter *iter = (ConCmdIter * )object; +#if SOURCE_ENGINE == SE_LEFT4DEAD + // ICvarIteratorInternal has no virtual destructor + g_pMemAlloc->Free(iter->pLast); +#endif delete iter; } }