From bd136289622aecf9f5f3059dcbdecd9594b091aa Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 25 Oct 2009 00:08:53 +0200 Subject: [PATCH] Fixed another cookie memory leak. --- src/zr/weapons/zmarket.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zr/weapons/zmarket.inc b/src/zr/weapons/zmarket.inc index d3f5751..cd514ce 100644 --- a/src/zr/weapons/zmarket.inc +++ b/src/zr/weapons/zmarket.inc @@ -1017,6 +1017,7 @@ stock ZMarketArrayToCookies(client, String:rebuyweapons[WeaponsSlot][], maxweapo // Find cookie handle, and retrieve its value. rebuycookie = FindClientCookie(rebuycookiename); SetClientCookie(client, rebuycookie, rebuyweapons[x]); + CloseHandle(rebuycookie); } } @@ -1042,6 +1043,7 @@ stock ZMarketCookiesToArray(client, String:rebuyweapons[WeaponsSlot][], maxweapo // Find cookie handle, and retrieve its value. rebuycookie = FindClientCookie(rebuycookiename); GetClientCookie(client, rebuycookie, rebuyweapons[x], maxlen); + CloseHandle(rebuycookie); } } @@ -1067,6 +1069,7 @@ stock ZMarketSetRebuyCookie(client, WeaponsSlot:slot, const String:value[]) // Set weapon to cookie. SetClientCookie(client, rebuycookie, value); + CloseHandle(rebuycookie); } /**