Browse Source

engine: client: fix memory leak on player disconnect

pull/2/head
Alibek Omarov 2 years ago
parent
commit
911385d019
  1. 7
      engine/client/cl_parse.c

7
engine/client/cl_parse.c

@ -1348,7 +1348,12 @@ void CL_UpdateUserinfo( sizebuf_t *msg ) @@ -1348,7 +1348,12 @@ void CL_UpdateUserinfo( sizebuf_t *msg )
if( slot == cl.playernum ) memcpy( &gameui.playerinfo, player, sizeof( player_info_t ));
}
else memset( player, 0, sizeof( *player ));
else
{
COM_ClearCustomizationList( &player->customdata, true );
memset( player, 0, sizeof( *player ));
}
}
/*

Loading…
Cancel
Save