If judgment be rendered in the action for the defendant the attachment shall be discharged and the property attached, or its proceeds, shall be returned to him. If the attachment or garnishment shall be discharged on motion prior to final judgment, the defendant may, upon proper supplemental answer, recover his damages, as in other cases for such wrongful attachment or garnishment.
Okla. Stat. tit. 12, § 1234