Entanglement in a noninteracting mesoscopic structure