From dfa11f64ef81084a182dd842220595be1ed75989 Mon Sep 17 00:00:00 2001 From: Kyle Sanderson Date: Sat, 20 Jul 2013 15:17:43 -0400 Subject: [PATCH] Fixed handle misuse in clientprefs plugin (bug 5805, r=psychonic). --HG-- extra : amend_source : a63c384e65feb0238bfc4e8ab618bc637a015962 --- plugins/clientprefs.sp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/clientprefs.sp b/plugins/clientprefs.sp index c380fdef..209e0e19 100644 --- a/plugins/clientprefs.sp +++ b/plugins/clientprefs.sp @@ -86,6 +86,7 @@ public Action:Command_Cookie(client, args) } } + CloseHandle(iter); return Plugin_Handled; } @@ -112,6 +113,7 @@ public Action:Command_Cookie(client, args) if (access == CookieAccess_Private) { ReplyToCommand(client, "[SM] %t", "Cookie not Found", name); + CloseHandle(cookie); return Plugin_Handled; } @@ -123,12 +125,14 @@ public Action:Command_Cookie(client, args) GetClientCookie(client, cookie, value, sizeof(value)); ReplyToCommand(client, "[SM] %t", "Cookie Value", name, value); + CloseHandle(cookie); return Plugin_Handled; } if (access == CookieAccess_Protected) { ReplyToCommand(client, "[SM] %t", "Protected Cookie", name); + CloseHandle(cookie); return Plugin_Handled; } @@ -137,6 +141,7 @@ public Action:Command_Cookie(client, args) GetCmdArg(2, value, sizeof(value)); SetClientCookie(client, cookie, value); + CloseHandle(cookie); ReplyToCommand(client, "[SM] %t", "Cookie Changed Value", name, value); return Plugin_Handled;