Fixed various memory leaks.
This commit is contained in:
parent
37fe9fae8b
commit
d5e4e89ba5
|
@ -197,6 +197,8 @@ InfectOnClientDisconnect(client)
|
|||
// If there are no eligible client's then stop.
|
||||
if (!eligibleclients)
|
||||
{
|
||||
// Destroy handle.
|
||||
CloseHandle(arrayEligibleClients);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -416,6 +418,8 @@ public Action:InfectMotherZombie(Handle:timer)
|
|||
// If there are no eligible client's then stop.
|
||||
if (!eligibleclients)
|
||||
{
|
||||
// Destroy handle.
|
||||
CloseHandle(arrayEligibleClients);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -302,6 +302,10 @@ stock ModelsGetRandomModelIndex(String:modelpath[], maxlen, bool:all = true, boo
|
|||
if (size == 0)
|
||||
{
|
||||
strcopy(modelpath, maxlen, "");
|
||||
|
||||
// Destroy the handle.
|
||||
CloseHandle(modelsarray);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -409,6 +409,11 @@ ClassLoad(bool:keepMultipliers = false)
|
|||
if (!exists)
|
||||
{
|
||||
LogEvent(false, LogType_Fatal, LOG_CORE_EVENTS, LogModule_Playerclasses, "Config Validation", "Missing playerclasses config file \"%s\"", pathclasses);
|
||||
|
||||
// Remove key/value cache.
|
||||
CloseHandle(kvClassData);
|
||||
kvClassData = INVALID_HANDLE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -340,6 +340,9 @@ RoundEndBalanceTeams()
|
|||
// If there are no eligible client's then stop.
|
||||
if (!eligibleclients)
|
||||
{
|
||||
// Destroy handle.
|
||||
CloseHandle(arrayEligibleClients);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,10 @@ SayHooksGetPublicChatTrigger(String:trigger[], maxlen)
|
|||
if (!success)
|
||||
{
|
||||
strcopy(trigger, maxlen, SAYHOOKS_CHAT_PUBLIC_DEFAULT);
|
||||
|
||||
// Close the handle.
|
||||
CloseHandle(kvCore);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -117,6 +121,10 @@ SayHooksGetSilentChatTrigger(String:trigger[], maxlen)
|
|||
if (!success)
|
||||
{
|
||||
strcopy(trigger, maxlen, SAYHOOKS_CHAT_SILENT_DEFAULT);
|
||||
|
||||
// Close the handle.
|
||||
CloseHandle(kvCore);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user