In many jurisdictions, under civil law, the marriage becomes valid if the impediment is removed. If it is not removed, the innocent spouse, at least, is often entitled to the protections of a divorce for division of property and child custody.
Under civil law in many places, a marriage gains legitimacy when the impediment is lifted. However, if this does not occur, the innocent partner usually has recourse to the protections of a divorce for dividing assets and making arrangements for children.