By using nonequilibrium Green's functions in combination with the density functional theory, the spin transport properties of a single-molecule spintronic device are investigated. The computational results show that when the magnetic configuration of the device is set as parallel, the perfect spin-filtering effect can be observed. Especially, this perfect spin-filtering effect is independent of the number of carbon atoms in the carbon chain. However, when the magnetic configuration is set in antiparallel, the spin-filtering effect displays a st...