CCRP 538     

Art. 538.  Effect of sustaining motion to quash

The court shall order the defendant discharged from custody or bail, as to that charge, when it sustains a motion to quash based upon the ground that:

(1)  The offense is not punishable under a valid statute;

(2)  Trial for the offense charged would constitute double jeopardy;

(3)  The time limitation for the institution of prosecution or for the commencement of trial has expired; or

(4)  The court has no jurisdiction of the offense charged.

In other cases, when a motion to quash is sustained, the court may order that the defendant be held in custody or that his bail be continued for a specified time, pending the filing of a new indictment.