Skip to content

Commit

Permalink
Prevent memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Bara committed May 4, 2018
1 parent 26e245f commit 3e16a3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/ttt/ttt.sp
Expand Up @@ -2094,13 +2094,15 @@ stock void ShowRules(int client, int iItem)
{
SetFailState("Can't read %s correctly! (ImportFromFile)", g_sRulesFile);
delete kvRules;
delete hFile;
return;
}

if (!kvRules.GotoFirstSubKey())
{
SetFailState("Can't read %s correctly! (GotoFirstSubKey)", g_sRulesFile);
delete kvRules;
delete hFile;
return;
}

Expand Down

0 comments on commit 3e16a3d

Please sign in to comment.