27-18-902. Procedure when defendant recovers judgment. If the defendant recovers judgment against the plaintiff, any undertaking received in the action, all of the proceeds of sales and money collected by the sheriff, and all the property attached remaining in the sheriff's hands must be delivered to the defendant or the defendant's agent. The order of attachment must be discharged and the property released from attachment.