To exonerate the bail, the surrender of the defendant must be made to the sheriff of the county in which the court is held, to which the defendant is bound to appear or to which the trial has been removed; and, if the charge is for a misdemeanor, the sheriff may discharge him on his giving new bail; otherwise, he must keep him in jail until discharged by law.
Ala. Code § 15-13-64 (1975)