If the defendant on a preliminary examination for a public offense be discharged as provided in the last section and if the magistrate find that the prosecution was malicious and without probable cause, he shall enter such judgment on his docket and tax the costs against the complaining witness which shall be enforced as judgments for costs in criminal cases, and execution may issue therefor.
R.L.1910, § 5679.