Fix various problems with unloading ClientPrefs and SourceMod (bug 5874, r=ds).

--HG--
extra : rebase_source : 0a35f8380d651ca65fac9dd402c5cd3625e3105c
This commit is contained in:
David Anderson
2013-08-22 14:05:44 -07:00
parent d79b41e4a7
commit 94d33a4ef1
17 changed files with 195 additions and 183 deletions
-17
View File
@@ -303,23 +303,6 @@ int TQueryOp::PullQuerySerial()
ParamData::~ParamData()
{
if (cookie)
{
g_ClientPrefs.cookieMutex->Lock();
cookie->usedInQuery--;
if (cookie->shouldDelete && cookie->usedInQuery <= 0)
{
g_ClientPrefs.cookieMutex->Unlock();
delete cookie;
cookie = NULL;
}
else
{
g_ClientPrefs.cookieMutex->Unlock();
}
}
if (data)
{
/* Data is only ever passed in a client disconnect query and always needs to be deleted */