Sec. 5. Any part or all of the commutation accrued under this article may be forfeited and taken away by the sheriff:
(1) for a sustained charge of misconduct in violation of any rule known to the defendant, including escape or attempt to escape, if the sheriff has complied with discipline proceedings as approved by the Commission on Jail Standards;
(2) on receipt by the sheriff of a certified copy of a final order of a state or federal court that dismisses as frivolous or malicious a lawsuit brought by a defendant while the defendant was in the custody of the sheriff; or
(3) if the defendant, in violation of an order entered under Article 42.24, contacts the victim of the offense for which the defendant is serving a sentence or a member of the victim's family.