mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-05-17 17:18:01 +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 ( !bFoundWhitelist )
|
||||
{
|
||||
pWhitelistKV->deleteThis();
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, go through the KVs and turn on the matching items.
|
||||
Msg("Parsing item whitelist (default: %s)\n", bDefault ? "allowed" : "disallowed" );
|
||||
KeyValues* ownerWhitelistKV = pWhitelistKV;
|
||||
pWhitelistKV = pWhitelistKV->GetFirstSubKey();
|
||||
while ( pWhitelistKV )
|
||||
{
|
||||
@ -204,6 +208,8 @@ void CEconItemSystem::ReloadWhitelist( void )
|
||||
pWhitelistKV = pWhitelistKV->GetNextKey();
|
||||
}
|
||||
Msg("Finished.\n");
|
||||
|
||||
ownerWhitelistKV->deleteThis();
|
||||
}
|
||||
|
||||
#ifdef GAME_DLL
|
||||
|
Loading…
x
Reference in New Issue
Block a user