mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 16:54:29 +00:00
Fix memory leak
This commit is contained in:
parent
d3a0146b5a
commit
37aa201ed7
@ -342,6 +342,7 @@ void SV_ConnectClient( netadr_t from )
|
|||||||
sv.current_client = newcl;
|
sv.current_client = newcl;
|
||||||
newcl->edict = EDICT_NUM( (newcl - svs.clients) + 1 );
|
newcl->edict = EDICT_NUM( (newcl - svs.clients) + 1 );
|
||||||
newcl->challenge = challenge; // save challenge for checksumming
|
newcl->challenge = challenge; // save challenge for checksumming
|
||||||
|
if( newcl->frames ) Mem_Free( newcl->frames );
|
||||||
newcl->frames = (client_frame_t *)Z_Malloc( sizeof( client_frame_t ) * SV_UPDATE_BACKUP );
|
newcl->frames = (client_frame_t *)Z_Malloc( sizeof( client_frame_t ) * SV_UPDATE_BACKUP );
|
||||||
newcl->userid = g_userid++; // create unique userid
|
newcl->userid = g_userid++; // create unique userid
|
||||||
newcl->state = cs_connected;
|
newcl->state = cs_connected;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user