A witness so imprisoned by an officer before whom his deposition is being taken, may apply to a judge of a court of record, who shall have power to discharge him, if it appears that his imprisonment is illegal.
Okla. Stat. tit. 12, § 395
Discharge when imprisonment illegal
R.L. 1910, § 5060.
Official source: Oklahoma Legislature. Reproduced from public-domain Oklahoma statutes; confirm against the official source for the current text. Not legal advice.