
210 Va. 416 (1970)
WALTER W. BLAIR
v.
C. C. PEYTON, SUPERINTENDENT OF THE VIRGINIA STATE PENITENTARY.
Record No. 7046.
Supreme Court of Virginia.
January 19, 1970.
Present, All the Justices.
Habeas corpus is designed to provide discharge from custody for a petitioner unlawfully detained.  Since petitioner is no longer detained, to pass upon merits of his claims would be to render advisory opinion not provided for by habeas corpus statute.
Error to a judgment of the Corporation Court of the City of Norfolk.  Hon. Linwood B. Tabb, judge presiding.
Leonard B. Sachs,    for plaintiff in error.
Gerald L. Baliles, Assistant Attorney General (Robert Y. Button, Attorney General; Reno S. Harp, III, Assistant Attorney General,    on brief), for defendant in error.
Per Curiam.
This is an appeal from a final order dismissing a petition for writ of habeas corpus filed by Walter W. Blair, the petitioner, against C. C. Peyton, Superintendent of the Virginia State Penitentiary.  James D. Cox, the present superintendent of the penitentiary, has been substituted in place of C. C. Peyton as respondent.
In his petition for a writ of habeas corpus, the petitioner attacked the validity of two convictions of armed robbery entered against him on February 20, 1950, by the Corporation Court of the City of Norfolk.  At the time he filed his petition, the petitioner had fully served the sentences imposed as a result of the convictions.  The petitioner was, at the time he filed his petition, serving sentences imposed upon *417 him on December 22, 1950, by the Circuit Court of Culpeper County, which he began serving following termination of the Norfolk sentences.
The petitioner completed serving the Culpeper sentences and was released from custody prior to the time his case was argued before this court.  He says, however, that we should retain jurisdiction and void the Norfolk convictions so that he will not suffer the civil disabilities resulting therefrom.
Our habeas corpus statutes are designed to provide relief in the form of the "discharge" (Code | 8-603) from the "person in whose custody" (Code | 8-598) petitioner is "detained without lawful authority" (Code | 8-596).  Thus, our statutes are unlike the Federal statute applied in    Carafas     LaVallee, 391 U.S. 234, 88 S.Ct. 1556, 20 L.Ed.2d 554 (1968), upon which the petitioner relies, and the case is not controlling here.
The petitioner is no longer detained and there is no custody from which to discharge him.  To pass upon the merits of his claims would be to render an advisory opinion -- a function our habeas corpus statutes neither provide for nor permit.  This court, therefore, is without jurisdiction further to entertain the case, and the appeal will be dismissed.
Appeal dismissed.
