
206 Cal.App.2d 327 (1962)
THE PEOPLE, Plaintiff and Respondent,
v.
BERNARD GOLDY, Defendant and Appellant.
Crim. No. 8008. 
California Court of Appeals. Second Dist., Div. Three.  
Aug. 1, 1962.
 Milton B. Safier for Defendant and Appellant.
 Stanley Mosk, Attorney General, and Carl Boronkay, Deputy Attorney General, for Plaintiff and Respondent.
 FILES, J.
 After a court trial defendant was convicted of possession of marijuana in violation of section 11530, Health and Safety Code. His motion for a new trial was denied. The court suspended proceedings and granted probation for a period of three years on various conditions, one being that defendant spend 30 days in jail. Defendant has appealed from the order denying the motion for new trial and the judgment (i.e., the order granting probation).
 The two points raised by defendant are (a) legality of the search which produced the marijuana, and (b) sufficiency of the evidence.
 [1a] The evidence which supports the decision of the trial court is as follows: Defendant was involved in a traffic accident and failed to stop. He was arrested shortly afterwards and taken to a hospital to be examined for the influence of narcotics. Marks from some prior use of narcotics were observed on his arm. Defendant told the examining doctor he had taken a prescribed narcotic for sleep.
 The following morning at the jail defendant, who was still in custody, was interviewed by two officers regarding his use of narcotics. Defendant said he had not used for a month. He said he had no narcotics at his home. One of the officers asked if they could search defendant's residence and defendant stated, "Yes, you are welcome to."
 [2a] The two officers escorted defendant to his home, where a search was made. One of the officers found a package containing 6 grams of marijuana in the pocket of a man's coat which was hanging in the bedroom closet. The officer showed the package to defendant and asked whom it belonged *329 to. Defendant stated that he had forgotten about the marijuana in the coat, that he had had it for several years.
 [3] The search having been made with the consent of the defendant, it was neither unreasonable nor unlawful. [4] The fact that the party consenting is then in custody does not necessarily invalidate the permission given. [5] Whether the defendant consented to the search in a particular case is a question of fact to be decided in the trial court. (People v. Davis, 178 Cal.App.2d 887, 893 [3 Cal.Rptr. 465].) [1b] There was here sufficient evidence to support the finding of the trial judge that the defendant did consent, and that the search was reasonable.
 Defendant argues that the evidence of guilt is insufficient because of a lack of evidence that defendant possessed the narcotic knowingly. Defendant cites People v. Gory, 28 Cal.2d 450 [170 P.2d 433], for the point that the evidence must show defendant's knowledge of the possession of the marijuana.
 [2b] The evidence here is sufficient. (Cf. People v. Redrick, 55 Cal.2d 282 [10 Cal.Rptr. 823, 359 P.2d 255].) The narcotic was found in the pocket of defendant's coat in defendant's closet in defendant's home. Moreover, defendant admitted to the officer that he had had it for several years and had forgotten about it. The trial judge was not required to believe defendant's testimony, given at the trial, that he didn't know the substance was there. The fact that he had forgotten it, if true, would not constitute a defense.
 The judgment and order appealed from are affirmed.
 Shinn, P. J., and Ford, J., concurred.
