2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

engine: server: always allocate svgame.stringspool, it's used to track temp string allocations like in SV_CopyString

Potentially fixes memory leakage on 64-bit when game uses instanced baselines or consistency lists
This commit is contained in:
Alibek Omarov 2024-11-13 23:34:50 +03:00
parent a749bb8ef1
commit 88c42d50f2
2 changed files with 3 additions and 3 deletions

View File

@ -3029,8 +3029,6 @@ void SV_EmptyStringPool( qboolean clear_stats )
str64.numdups = 0;
str64.numoverflows = 0;
}
#else // !XASH_64BIT
Mem_EmptyPool( svgame.stringspool );
#endif // !XASH_64BIT
}
@ -3153,9 +3151,10 @@ static void SV_AllocStringPool( void )
str64.plast = (byte*)ptr + 1;
svgame.globals->pStringBase = ptr;
#else // !XASH_64BIT
svgame.stringspool = Mem_AllocPool( "Server Strings" );
svgame.globals->pStringBase = "";
#endif // !XASH_64BIT
svgame.stringspool = Mem_AllocPool( "Server Strings" );
}
static void SV_FreeStringPool( void )

View File

@ -716,6 +716,7 @@ void SV_DeactivateServer( void )
PM_ClearPhysEnts( svgame.pmove );
SV_EmptyStringPool( true );
Mem_EmptyPool( svgame.stringspool );
for( i = 0; i < svs.maxclients; i++ )
{