§ 1024. Damages apportioned between heir and alienee. Where a widow recovers dower in real property aliened by the heir of her husband, she may recover, in a separate action against him, her damages for withholding her dower, from the time of the death of her husband to the time of the alienation, not exceeding six years in the whole. The sum recovered from him must be deducted from the sum which she would otherwise be entitled to recover from the grantee; and any sum recovered as damages from the grantee, must be deducted from the sum, which she would otherwise be entitled to recover from the heir.