From 37aa201ed79b8fd975115499ca5cbc4620a7231b Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 5 May 2018 00:26:56 +0700 Subject: [PATCH] Fix memory leak --- engine/server/sv_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c index b99b19d8..07ac1973 100644 --- a/engine/server/sv_client.c +++ b/engine/server/sv_client.c @@ -342,6 +342,7 @@ void SV_ConnectClient( netadr_t from ) sv.current_client = newcl; newcl->edict = EDICT_NUM( (newcl - svs.clients) + 1 ); 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->userid = g_userid++; // create unique userid newcl->state = cs_connected;