If, from the evidence on the trial, there is reason to believe the defendant guilty, and a new indictment or information can be framed upon which he may be convicted, the court may order him to be recommitted to the officer of the proper county, or admitted to bail anew, to answer the new indictment or information. If the evidence shows him guilty of another offense, he must be committed or held thereon, and in neither case shall the verdict be a bar to another prosecution. But if no evidence appears sufficient to charge him with any offense, he must, if in custody, be discharged; or if admitted to bail, his bail is exonerated; or if money has been deposited instead of bail, it must be refunded to the defendant or to the person or persons found by the court to have deposited said money on behalf of said defendant; and the arrest of judgment shall operate as an acquittal of the charge upon which the indictment or information was founded.
Ca. Pen. Code § 1188