
33 Ill. App.3d 705 (1975)
341 N.E.2d 732
THE PEOPLE ex rel. WILLIAM GWARTNEY, Petitioner-Appellant,
v.
LEO L. MEYER, Superintendent, Vandalia Correctional Center, Respondent-Appellee.
No. 75-152.
Illinois Appellate Court  Fifth District.
November 13, 1975.
*706 Frank J. Giampoli, of State Appellate Defender's Office, of Carbondale, and Peter M. Stragand, Research Assistant, for appellant.
John C. Reznick, State's Attorney, of Vandalia (Bruce D. Irish and Rolph F. Ehrmann, both of Illinois State's Attorneys Association, of counsel), for appellee.
Judgment affirmed.
Mr. JUSTICE KARNS delivered the opinion of the court:
Petitioner-appellant, William Gwartney, brought a petition for a writ of habeas corpus in the Circuit Court of Fayette County against Leo L. Meyer, Superintendent of the Vandalia Correctional Center. From the circuit court's denial of his petition he prosecutes this appeal.
Petitioner was imprisoned in the Vandalia Correctional Center pursuant to his negotiated guilty plea in the Circuit Court of Pike County on February 9, 1973, to an indictment charging violation of bail bond and two counts of aggravated assault. (Ill. Rev. Stat. 1971, ch. 38, pars. 12-2, 32-10.) On September 30, 1971, an indictment had been returned charging petitioner with two counts of attempt to commit murder and two counts of aggravated assault. Thereafter, on June 6, 1972, he was indicted for violation of bail bond, apparently because of his failure to appear for trial. Pursuant to plea negotiations, and represented by counsel, petitioner pleaded guilty to the two counts of aggravated assault and felony bail bond violation. The trial court found a factual basis for the plea and sentenced petitioner to one year on each of the aggravated assault counts and one to three years on violation of bail bond, the sentences to run concurrently.
Pursuant to the judgment of the Circuit Court of Pike County, petitioner was imprisoned at the Vandalia Correctional Center. On January 8, 1975, petitioner, represented by counsel, filed the instant petition for a writ of habeas corpus now in controversy. The petitioner alleged that if he were sentenced under the Criminal Code in effect before January 1, 1973, his sentence has been served if good time credit is deducted from his maximum sentence and he should be discharged immediately from the custody of respondent. Alternatively, he argued that under the Criminal Code in effect after January 1, 1973, it was improper to sentence him *707 for a felony bail bond violation where the offense for which he was convicted was a Class A misdemeanor, aggravated assault, and as part of the plea bargain, the indictment charging attempt to commit murder, a felony, was dismissed.
The State on January 31, 1973, answered the petition and admitted that under the repealed Criminal Code, the petitioner should be released immediately, but argued that the sentence was proper under the new code since petitioner had violated the condition of a bail bond "given in connection with a charge of felony," attempt to commit murder. Ill. Rev. Stat. 1973, ch. 38, pars. 8-4, 32-10.
On the same day, petitioner was released on parole. Counsel for petitioner nevertheless prosecuted the petition for writ, which was denied on March 4, 1975. The court held that since petitioner was charged with a felony, the negotiated plea to a felony bail bond violation was proper, notwithstanding the dismissal of the felony charge as part of the plea negotiations. The trial court further held that the sentencing provisions of the Unified Code of Corrections were applicable.
The issues presented on this appeal are: (1) whether the remedy of habeas corpus is available to a parolee; (2) whether petitioner's dispute with this defendant is moot; and (3) whether the petitioner is entitled to discharge from parole.
Habeas corpus actions in Illinois are governed by statute. (Ill. Rev. Stat. 1973, ch. 65, par. 1 et seq.) Section 1 of that statute provides that any "person imprisoned or otherwise restrained of his liberty, except as herein otherwise provided" may prosecute a writ of habeas corpus. Petitioner argues that his petition, although filed while he was incarcerated, is not only a petition that he be released from prison but also that he be discharged by the Department of Corrections. He further argues that even though he is now on parole, he is still "restrained of his liberty." This court has impliedly adopted the position that a parolee may be entitled to petition for a writ of habeas corpus. (People ex rel. Bassin v. Israel, 31 Ill. App.3d 744, 335 N.E.2d 53.) This may be the logical extension of the reasoning that a parolee is considered to be in the legal custody of the Department of Corrections until his discharge. (People ex rel. Johnson v. Pate, 47 Ill.2d 172, 265 N.E.2d 144 (1970), cert. denied, 402 U.S. 976, 29 L.Ed.2d 141, 91 S.Ct. 1679 (1971); People ex rel. Jefferson v. Brantley, 44 Ill.2d 31, 253 N.E.2d 378 (1969), cert. denied, 400 U.S. 834, 27 L.Ed.2d 65, 91 S.Ct. 68 (1970).) The argument for this position is that the restraints imposed upon a parolee and the power of the power of the Pardon and Parole Board to return him to prison for violation of parole do restrain an individual's liberty. Therefore, the concept of "custody" in the act (Ill. Rev. Stat. 1973, ch. 65, par. 21, 22) should *708 be interpreted to include a parolee who is subject to the Rules and Regulations of the Illinois Pardon and Parole Board. This is consistent with the Federal courts' interpretation of "custody" in the Federal habeas corpus statute (28 U.S.C. § 2241 et seq.). (E.g., Jones v. Cunningham, 371 U.S. 236, 9 L.Ed.2d 285, 83 S.Ct. 373 (1963).) The State argues that "custody" is not a concept capable of constructive definition, citing People ex rel. Petraborg v. Fields, 14 Ill. App.3d 1025, 303 N.E.2d 160 (1973). We are not required, however, to decide this question in the posture of the case before us.
Petitioner is no longer in the custody of the named defendant, the Superintendent of the Vandalia Correctional Center. Petitioner did not seek leave to add the Board of Pardons and Paroles or the Department of Corrections as parties respondent. We are faced squarely with the situation distinguished by the United States Supreme Court in Jones v. Cunningham, as petitioner does not seek to require the Department or Board to justify by what authority petitioner is continued on parole nor are they, in turn, given an opportunity to advance whatever argument they might make justifying petitioner's continued parole status. One of the arguments advanced by petitioner is that he has served his maximum sentence of three years if good time and good conduct credits are deducted. Good conduct credits are provided for in section 3-12-5 of the Unified Code of Corrections. (Ill. Rev. Stat. 1973, ch. 38, par. XXXX-XX-X.) These credits are discretionary allowances that the Department of Corrections may or may not grant under rules and regulations adopted by it under statutory authority. (Ill. Rev. Stat. 1973, ch. 38, par. 1003-6-3.) As noted, neither the Department of Corrections nor the Board of Pardon and Paroles was made a party to the present action and the absurdity of asking this court to speculate on the Department's allowance of discretionary sentence credits in this habeas corpus proceeding is apparent.
This case is distinguishable from People ex rel. Bassin v. Israel, since there we were only required to consider whether the trial court had correctly denied the prisoner's petition. In Bassin, the petitioner was released on parole after the trial court hearing, and before his appeal, while here petitioner was released before the hearing was held in the trial court. More importantly, the issue presented in that appeal, whether an attempt to commit voluntary manslaughter was a crime, was one suitable for judicial determination. In this case, however, petitioner's alleged right to release may depend on whether he is entitled to compensatory good time and good time credit. However, as we have noted, the allowance of these credits is discretionary, and we cannot effectively adjudge the *709 lawfulness of petitioner's restraint on parole without the response of the Department of Corrections or the Pardon and Parole Board.
 1, 2 Petitioner raises only one issue which might entitle him to immediate discharge: was his plea and sentence to a felony bail bond offense proper? Petitioner stood indicted on two counts of attempt to commit murder and two counts of aggravated assault at the time of his bail bond violation. Thus, under the Criminal Code in effect at that time, he had been "charged with" four felony offenses and was properly charged with a felony violation of bail bond. (Ill. Rev. Stat. 1971, ch. 38, par. 8-4, 12-2, 32-10.) Aggravated assault, however, was made a Class A misdemeanor by amendment effective January 1, 1973. Petitioner argues that it was error to allow his negotiated plea to a felony bail bond violation since he was allowed to plead guilty only to aggravated assault, a misdemeanor under the Unified Code of Corrections, as part of the plea agreement. Should we reach this issue, we would be required to determine issues not cognizable under habeas corpus since at most the judgment of the trial court would be erroneous, not void, and subject to correction only by direct appeal.
Habeas corpus may not be employed as a substitute for a writ of error or appeal to review errors of a nonjurisdictional nature. (People ex rel. Lewis v. Frye, 42 Ill.2d 58, 245 N.E.2d 483 (1969); People ex rel. Rose v. Randolph, 33 Ill.2d 453, 457, 211 N.E.2d 685, 687 (1965). People ex rel. Wiseman v. Nierstheimer, 401 Ill. 260, 81 N.E.2d 900 (1948).) Even should we adopt petitioner's argument, however, the original judgment of conviction would at most be erroneous and the sentence imposed was clearly within the statutory limit for the offense to which defendant entered a negotiated guilty plea.
Since petitioner's claim to sentence credits cannot be determined in the posture of this case and since the trial court had jurisdiction to enter judgment and impose sentence, we find no error in the trial court's denial of the petition for habeas corpus.
For the foregoing reasons, the judgment of the Circuit Court of Fayette County is affirmed.
Affirmed.
EBERSPACHER and G. MORAN, JJ., concur.
