From 58937373213e87b3c024ef2a7ff7c4738d697c11 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 12 Jul 2015 17:38:50 -0400 Subject: [PATCH] Fix handle leak. --- core/PlayerManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index a46e1f99..381da077 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -1264,6 +1264,9 @@ void PlayerManager::OnClientCommandKeyValues(edict_t *pEntity, KeyValues *pComma m_clcommandkv->Execute(&res); m_bInCCKVHook = false; + HandleSecurity sec(g_pCoreIdent, g_pCoreIdent); + handlesys->FreeHandle(hndl, &sec); + if (res >= Pl_Handled) { s_LastCCKVAllowed = false; @@ -1303,6 +1306,9 @@ void PlayerManager::OnClientCommandKeyValues_Post(edict_t *pEntity, KeyValues *p m_clcommandkv_post->PushCell(hndl); m_clcommandkv_post->Execute(); m_bInCCKVHook = false; + + HandleSecurity sec(g_pCoreIdent, g_pCoreIdent); + handlesys->FreeHandle(hndl, &sec); } #endif