We consider the voter model dynamics in random networks with an arbitrary distribution of the degree of the nodes. We find that for the usual node-update dynamics the average magnetization is not conserved, while an average magnetization weighted by the degree of the node is conserved. However, for a link-update dynamics the average magnetization is still conserved. For the particular case of a Barabasi-Albert scale-free network the voter model dynamics leads to a partially ordered metastable state with a finite size survival time. This characteristic time scales linearly with system size only when the updating rule respects the conservation law of the average magnetization. This scaling identifies a universal or generic property of the voter model dynamics associated with the conservation law of the magnetization.