If a defendant is not arrested on a warrant from the proper county: 1. The defendant must be discharged from custody; 2. The defendant's bail in the action must be exonerated; or 3. Money deposited instead of bail must be refunded, as the case may be, and the sureties in the undertaking, as mentioned in section 29-21-21, must be discharged.