Add error checking after call to malloc in team_addPlayer