Direct diagonalization of the transfer matrix of the zero-field free-fermion model