
    Troy Lee GRIFFITH, Jr., Appellant, v. Raymond SCHULTZ, Jr., and Caswell P. Lane, Appellees.
    Supreme Court of Kentucky.
    Nov. 3, 1980.
    John S. Turner, Winchester, for appellant.
   STERNBERG, Justice.

This is an appeal from an order of the Court of Appeals of Kentucky dated July 29, 1980, denying appellant’s “Petition for Prohibition and Writ of Habeas Corpus.” Appellant discusses certain criminal proceedings which are not pertinent to the disposition of the present action. We shall relate only those facts which we find appropriate to the issues presented.

Appellee Raymond Schultz, Jr., is the jailer of Montgomery County, Kentucky, and appellee Caswell P. Lane is the circuit judge of the 21st Judicial District for the Commonwealth of Kentucky. Neither of the appellees has responded to appellant’s petition; consequently, we will accept the allegations contained therein as true.

Appellant was formerly married to Betty Farmer Griffith, to which marriage was born one child, Troy Lee Griffith, III. On March 19, 1980, a petition for the dissolution of the Griffith marriage was filed in the Lee Circuit Court. On April 1,1980, an order was entered in the Lee Circuit Court granting Betty temporary custody of the infant and further ordering the appellant to pay $50 per week as child support and $50 per week as temporary maintenance. Appellant failed to pay the child support and maintenance as ordered and is charged with having failed on one occasion to return custody of the infant to his mother. On May 30, 1980, Betty moved the trial court to issue an order requiring the appellant to show cause, if any he can, why he should not comply with the April 1, 1980, order of the Lee Circuit Court as to custody, child support and maintenance. On June 12, 1980, the appellant filed a “Response and Motion” traversing the allegations of Betty’s show cause motion and affirmatively sought to have the trial judge set aside the April 1, 1980, order. Betty’s motion for a rule and appellant’s response thereto came on for trial on June 20,1980. The Honorable Caswell P. Lane, Special Judge, heard the evidence offered on behalf of Betty and, without affording the appellant an opportunity to present his evidence, continued the case to July 3,1980, for further trial; found the appellant guilty of having failed to comply with the April 1, 1980, order; and by verbal order committed appellant to jail for an indeterminate time, where appellant stayed for about 25 days.

On June 30,1980, the appellant filed a document styled “Petition for Prohibition and Writ of Habeas Corpus” in the Court of Appeals of Kentucky. It took on the complexion of a two-pronged attack on the propriety of appellant’s incarceration. The designation given to this pleading is somewhat cumbersome, at least novel. However, the nature and legal effect of a pleading will be determined by its substance rather than by mere linguistic form. Cargo Truck Leasing Company v. Piper, Ky., 394 S.W.2d 472 (1965). Appellant sought to invoke the aid of the writ of habeas corpus and, in addition thereto, asked the Court of Appeals to exercise its original jurisdiction so as to control the action of the circuit judge.

Habeas Corpus

We will approach the habeas corpus issue by first referring to KRS 419.020, which provides that:

“The writ of habeas corpus shall be issued upon petition on behalf of anyone showing by affidavit probable cause that he is being detained without lawful authority or is being imprisoned when by law he is entitled to bail. The writ may be issued by any circuit judge on any day at any time and his power to issue such writs shall be coextensive with the commonwealth.”

The jurisdiction for the issuance of a writ of habeas corpus is in the circuit court and not in the Court of Appeals. The writ of habeas corpus is a constitutional protection against illegal restraint, its purpose being to regain liberty of a person who is being illegally restrained. Boss v. Wingo, Ky., 433 S.W.2d 137 (1968); Day v. Caudill, Ky., 300 S.W.2d 45 (1957). When appellant regained his freedom, his habeas corpus proceeding became moot. Hinton v. Byerly, Ky., 483 S.W.2d 138 (1972).

So much of appellant’s pleading as pertains to the issuance of a writ of habeas corpus was properly denied by the Court of Appeals.

Petition for Prohibition

Next we approach the issue of the propriety of the Court of Appeals in refusing to exercise its original jurisdiction so as to control the action of the appellees.

Insofar as the appellee Schultz is concerned, there are two reasons why we must concur with the action of the Court of Appeals. First, the appellant is now free from custody and the question has become moot and, secondly, the relief from incarceration by a circuit judge is properly directed at the control of a judicial officer, not a nonjudicial officer such as the jailer. City of Danville v. Wilson, Ky., 395 S.W.2d 583 (1965).

We next turn our attention to the propriety of the refusal of the Court of Appeals to act so as to control the action of the circuit judge. The basis for prohibition against a judicial officer is that he is without jurisdiction or is proceeding erroneously within his jurisdiction. Mid-Southern Toyota, Ltd. v. Pennington, Ky., 458 S.W.2d 776 (1970); Faulkner v. Bertram, Ky., 435 S.W.2d 60 (1968). Even as the question of jurisdiction became moot as to the jailer upon appellant’s release, so the question of appellant’s incarceration became moot as to the control of the circuit judge. It would indeed appear folly to order the release of someone who is not restrained of his liberty. The circuit judge may have acted erroneously in holding appellant in contempt of the April 1, 1980, order of the circuit court, but certainly the circuit judge was acting within his jurisdiction. In day v. Winn, Ky., 434 S.W.2d 650 (1968), we held that the proper way to present the present issue to the Court of Appeals is by appeal from the order of the circuit court, not by an application for a writ of prohibition. Robey v. Winn, Ky., 453 S.W.2d 763 (1970); Clay v. Clay, Ky., 424 S.W.2d 583 (1968).

We note that the trial judge held the appellant in contempt of court prior to affording him an opportunity to present his evidence on the issue of whether he had failed to comply with the April 1, 1980, order of the Lee Circuit Court. The trial of this issue was continued from June 20,1980, to July 3, 1980. We assume, there appearing nothing to the contrary, that the issue was fully heard on July 3, 1980. It would serve no useful purpose to return this case to the circuit court for a trial on the issue since there is nothing in the record to disclose that it has not already been tried. The appellant, if he is now dissatisfied with the decision of the trial court on the adequacy of his response to Betty’s motion, can have it reviewed by the Court of Appeals. Ky. Constitution, Section 115.

The Court of Appeals properly denied appellant the relief which he sought.

The action of the Court of Appeals is affirmed.

PALMORE, C. J., and AKER, CLAYTON, LUKOWSKY, STEPHENS and STERNBERG, JJ., sitting.

All concur.  