- Revert back to Z_Malloc from Hunk_FreeTempMemory introduced in r2077 as Hunk_FreeTempMemory must be freed in LIFO order (#5079)
- Introduce SV_ClientFree() to prevent memory leaks r2077 was supposed to fix
This commit is contained in:
parent
265d6e0374
commit
f6d6ed4b30
4 changed files with 62 additions and 17 deletions
|
@ -760,8 +760,14 @@ void SV_Shutdown( char *finalmsg ) {
|
|||
SV_ClearServer();
|
||||
|
||||
// free server static data
|
||||
if ( svs.clients ) {
|
||||
Z_Free( svs.clients );
|
||||
if(svs.clients)
|
||||
{
|
||||
int index;
|
||||
|
||||
for(index = 0; index < sv_maxclients->integer; index++)
|
||||
SV_FreeClient(&svs.clients[index]);
|
||||
|
||||
Z_Free(svs.clients);
|
||||
}
|
||||
Com_Memset( &svs, 0, sizeof( svs ) );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue