
9 Cal.2d 583 (1937)
In the Matter of the Application of E. B. HARTMAN for a Writ of Habeas Corpus.
Crim. No. 4099. 
Supreme Court of California. In Bank.  
September 21, 1937.
 Joseph Seymour for Appellant.
 U.S. Webb, Attorney-General, Lionel Browne, Deputy Attorney-General, and Stanley Mussell, District Attorney, for Respondent.
 SHENK, J.
 By complaint filed in the Justice's Court of San Bernardino Township, County of San Bernardino, the petitioner was charged in count one with the violation of section 15 of the state Chiropractic Act, a misdemeanor, committed on January 8, 1936, in "San Bernardino Township, County of San Bernardino, State of California". In count *584 two he was charged with the violation of section 17 of the State Medical Act, a misdemeanor, committed on January 8, 1936, "within the State of California".
 The petitioner was convicted on both counts, was sentenced to serve ninety days on the first count and one hundred eighty days on the second count, the sentences to run concurrently. He served the ninety-day sentence on count one in the county jail of San Bernardino County, and upon the expiration thereof filed this application for his release from custody on the ground that his further imprisonment under count two is illegal. His contention is that count two is insufficient upon which to base a conviction because it is not alleged therein where the alleged offense was committed except "within the State of California". In other words, it is contended that the absence of an allegation that the crime was committed in San Bernardino township or in the county of San Bernardino rendered the count insufficient to warrant conviction and imprisonment.
 [1] The petition alleges that count two does not substantially conform to the requirements of sections 950, 951 and 952 of the Penal Code. Those sections have to do with the form of indictments and informations and, together with subdivision 4 of section 959 of the same code, provide that the pleading show the county in which the offense was committed. But those sections are not applicable to pleadings in justices' courts which are governed by section 1426 of the Penal Code, wherein it is provided that the complaint in a justice's court shall set forth the offense charged "with such particulars of time, place, person, and property as to enable the defendant to understand distinctly the character of the offense complained of, and to answer the complaint. In charging an offense, each count shall contain, and shall be sufficient if it contains in substance, a statement that the accused has committed some public offense therein specified."
 [2] Good pleading would require that the complaint allege the township in which the alleged offense was committed, but the code sections governing pleadings in justices' courts do not specifically provide that such fact be alleged, and it was held in In re Kaster, 52 Cal.App. 454 [198 P. 1029], that the failure of the complaint to designate the township in which the crime was committed was not fatal to the execution of *585 a judgment of conviction on such a defective pleading. It was there held that nothing could be found in the statute making it mandatory to insert in the complaint the name of the township wherein it is claimed the offense was committed; that while the writ of habeas corpus would lie when the complaint wholly failed to state a public offense, the writ could not be made to subserve the office of a demurrer; and that it was too late to raise the point after the judgment of conviction had become final in a case where it appeared that on the trial the court had jurisdiction of the subject-matter of the action and of the person of the defendant. The holding of the district court of appeal was approved by this court in In re Kaster, 185 Cal. 647 [198 P. 1031].
 In the present proceeding it is not contended that the offense with which the petitioner was charged and convicted was not committed in the township of San Bernardino. If such was not the fact it was incumbent on the petitioner so to allege. The complaint was entitled: "In the Justice's court of San Bernardino Township, County of San Bernardino, State of California." The first count alleged the matters which the petitioner claims the second count should have contained. The fact that in pleading the second count the name of the township and county were omitted could not have operated to the prejudice of the petitioner. When a defendant, under the circumstances here shown, suffers a doubtful record to become final against him without objection, he may not thereafter freely criticize it in an indirect attack upon it. (Campbell v. Aderhold, 67 Fed.2d 246.) This court would not be justified in releasing a petitioner on habeas corpus who even now is not denying that he was convicted in the township wherein the offense was committed, but complains only that the complaint charging him with the offense did not allege that it was committed in that township.
 The writ is discharged and the petitioner is remanded.
 Curtis, J., Seawell, J., Langdon, J., Edmonds, J., and Waste, C.J., concurred.
