- 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:
1 parent
265d6e0374
commit
f6d6ed4b30
4 files changed
+62
-17
No files matched your search
@@ -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 ) );
|
||||
|
||||
|
||||
Reference in new issue
Block a user