mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-05-18 01:28:02 +03:00
client: Do not leak ECON whitelist (item_whitelist.txt) KeyValues
This commit is contained in:
parent
b2a7d26493
commit
f824c74768
@ -177,10 +177,14 @@ void CEconItemSystem::ReloadWhitelist( void )
|
|||||||
|
|
||||||
// If we didn't find a file, we're done.
|
// If we didn't find a file, we're done.
|
||||||
if ( !bFoundWhitelist )
|
if ( !bFoundWhitelist )
|
||||||
|
{
|
||||||
|
pWhitelistKV->deleteThis();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, go through the KVs and turn on the matching items.
|
// Otherwise, go through the KVs and turn on the matching items.
|
||||||
Msg("Parsing item whitelist (default: %s)\n", bDefault ? "allowed" : "disallowed" );
|
Msg("Parsing item whitelist (default: %s)\n", bDefault ? "allowed" : "disallowed" );
|
||||||
|
KeyValues* ownerWhitelistKV = pWhitelistKV;
|
||||||
pWhitelistKV = pWhitelistKV->GetFirstSubKey();
|
pWhitelistKV = pWhitelistKV->GetFirstSubKey();
|
||||||
while ( pWhitelistKV )
|
while ( pWhitelistKV )
|
||||||
{
|
{
|
||||||
@ -204,6 +208,8 @@ void CEconItemSystem::ReloadWhitelist( void )
|
|||||||
pWhitelistKV = pWhitelistKV->GetNextKey();
|
pWhitelistKV = pWhitelistKV->GetNextKey();
|
||||||
}
|
}
|
||||||
Msg("Finished.\n");
|
Msg("Finished.\n");
|
||||||
|
|
||||||
|
ownerWhitelistKV->deleteThis();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user