delivered the opinion of the court:
*420On February 18, 1969, Larry Ledford entered a plea of guilty to an indictment for burglary in the circuit court of Saline County, and was sentenced to a term of 1 to 7 years in the Illinois State Penitentiary at Menard on February 20, 1969.
He did not pursue an appeal nor file a post-conviction petition but filed this petition for habeas corpus on September 19, 1969, in circuit court of Saline County. The petition states that (1) the plea of guilty was involuntary; (2) that the indictment was void; and (3) that the grand jury proceedings were void. In the view we take of the second point, the attack on the validity of the indictment, it will not be necessary to pass on the other points raised.
The indictment here charges burglary in the following language:
“The Grand Jury charges: That on August 29, 1968, in Saline County, Larry Ledford committed the offense of burglary in that he did then and there knowingly and without lawful authority enter into a dwelling in Harrisburg, Illinois, with intent to commit therein a theft, and did take without authority from is rightful owner, H. H. Barter, in violation of Paragraph 19 — 1, Chapter 38, Illinois Revised Statutes.”
Respondent warden filed a motion to dismiss the petition and counsel was appointed to represent petitioner. On October 17, 1969, the court dismissed the habeas corpus petition. Petitioner was advised of his right to appeal and notice of appeal was filed on October 29, 1969.
Petitioner contends that the indictment here is defective because it fails to allege the ownership of the dwelling burglarized, or the property stolen and that such defect is not merely a procedural or technical error but that such defect is jurisdictional, and therefore the conviction is subject to attack by habeas corpus. He concedes that habeas corpus is not available to set aside a conviction on non jurisdictional grounds only. (People ex rel. Kelley v. Frye, 41 *421Ill.2d 287; People ex rel. Flowers v. Gruenewald, 390 Ill. 79; People ex rel. Geogetown v. Murphy, 202 Ill. 493, 497.) It is the settled law of this State that the writ of habeas corpus cannot operate as a writ of review.
Habeas corpus is appropriate however to reach defects in an indictment which are jurisdictional, and the validity of an indictment is properly challenged by habeas corpus if it is in fact void. People ex rel. Kelley v. Frye, 41 Ill.2d 287.
The question then is whether the failure to set forth the ownership of the building is jurisdictional. In the case of People v. Picard, 284 Ill. 588, this court said at page 590: “An indictment or information must allege all the facts necessary to constitute the crime with which the defendant is charged, and if it does not set forth such facts with sufficient certainty it will not support a conviction. [Citation.] Except in so far as the rule may be changed by statute, an indictment for burglary, whether it comes under the common law or under a statute, must allege the ownership of the building broken or entered, if it is known, or it will be fatally defective. [Citation.]”
This court also stated in People v. Pernalsky, (a burglary indictment,) 332 Ill. 38, 39, that “The ownership of the building entered is an essential allegation in charging the offense of burglary. Where an allegation of ownership is necessary in an indictment the ownership must be alleged in a person, corporation or other identity that may be the owner of property.”
Other cases to the same effect are: People v. Smith, 342 Ill. 600, and People v. Knox, 98 Ill. App. 2d 270. In People v. Mosley, 25 Ill.2d 400, at 402, it was held that “the ownership or possession of a dwelling is an essential allegation of an indictment alleging burglary, which allegation must be proved as laid in order to safeguard the accused against double jeopardy.” 13 Am. Jur. 2d, Burglary, § 37.
In view of the fact that there is no allegation of ownership of the dwelling burglarized this indictment is fatally *422defective. It is also noted that the indictment does not in any way describe any property taken.
The fact that defendant pleaded guilty to this indictment is immaterial. We have frequently held that a voluntary plea of guilty waives all errors or irregularities that are not jurisdictional. (People v. Brown, 41 Ill.2d 503, 505 ; People v. Dennis, 34 Ill.2d 219; People v. Smith, 23 Ill.2d 512.) The defect in the indictment in this instance is, however, jurisdictional, which renders the indictment void. It is therefore necessary to reverse the judgment of the circuit court, and to order the petitioner discharged.
Judgment reversed; petitioner discharged.