If the judgment is reversed, the appellate court may order a new trial or that the defendant be discharged or that he be held in custody until discharged by due course of law or make such other order as the case may require. If the defendant is ordered to be discharged, no forfeiture can be taken on his undertaking of bail.
Ala. Code § 12-22-242 (1975)