diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-07-15 14:44:06 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 22:27:32 +0000 |
commit | a63482883e0e3487da4544699fa9c419cb17127d (patch) | |
tree | f711e82ecebdd863d52f290de8515e898282801b /src/server/sv_init.c | |
parent | f7f76ecf69a2908810007940feff04a42121fd05 (diff) |
- 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
Diffstat (limited to 'src/server/sv_init.c')
-rw-r--r-- | src/server/sv_init.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/sv_init.c b/src/server/sv_init.c index d2e51d9f..4c0ae128 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -737,8 +737,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 ) ); |