CCRP 361     

Art. 361.  Custody without court order

If the person in custody is being held not by virtue of a court order, the court, after the hearing, shall discharge or refuse to discharge the person from custody as justice may require.