Merge pull request #4 from olegtsvetkov/handles
Fixed memory leak, caused by not closed handle
This commit is contained in:
commit
fc9ed45650
|
@ -154,6 +154,7 @@ OverlaysOnRoundStart()
|
|||
new Float:overlaysupdate = GetConVarFloat(g_hCvarsList[CVAR_OVERLAYS_UPDATE_TIME]);
|
||||
if (overlaysupdate <= 0.0)
|
||||
{
|
||||
tOverlays = INVALID_HANDLE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -334,6 +334,8 @@ public Action:ClassModifyCommand(client, argc)
|
|||
if (attributeflag < 0)
|
||||
{
|
||||
ReplyToCommand(client, "Invalid class attribute specified.");
|
||||
CloseHandle(classlist);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
@ -370,6 +372,8 @@ public Action:ClassModifyCommand(client, argc)
|
|||
if (!listresult)
|
||||
{
|
||||
ReplyToCommand(client, "Failed to get classes in the specified team: \"%s\".", classname);
|
||||
CloseHandle(classlist);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
@ -432,6 +436,8 @@ public Action:ClassModifyCommand(client, argc)
|
|||
if (!ClassValidateIndex(classindex))
|
||||
{
|
||||
ReplyToCommand(client, "Invalid class name specified.");
|
||||
CloseHandle(classlist);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
@ -478,6 +484,8 @@ public Action:ClassModifyCommand(client, argc)
|
|||
}
|
||||
}
|
||||
|
||||
CloseHandle(classlist);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ RespawnOnClientDeath(client, attacker, const String:weapon[])
|
|||
// If player was infected, then stop.
|
||||
if (StrEqual(weapon, "zombie_claws_of_death", false))
|
||||
{
|
||||
tRespawn[client] = INVALID_HANDLE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,6 +106,7 @@ RespawnOnClientDeath(client, attacker, const String:weapon[])
|
|||
new bool:respawn = GetConVarBool(g_hCvarsList[CVAR_RESPAWN]);
|
||||
if (!respawn)
|
||||
{
|
||||
tRespawn[client] = INVALID_HANDLE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user