delivered the opinion of the court:
*518In 1958 the defendant, Alvin Braden, was tried by the court without a jury in the criminal court of Cook County and convicted of the crime of unlawful sale of narcotics for which he was sentenced to the penitentiary for a term of not less than 10 nor more than 12 years. We have issued a writ of error to review the judgment of conviction.
Prior to trial, the defendant 'moved to suppress evidence obtained in a search of the defendant’s apartment and the motion was denied. The principal argument on this writ of error is that the court erred in denying the motion to suppress. Officer Robert Heiser testified that at about 1:15 on the morning of December 3, 1958, he and officer Joseph Healy and Robert Conn entered the apartment building where the defendant lived and knocked at a door on the second floor which led to a common hallway. When the defendant asked who was there Conn said, “It’s me, Bob.” The defendant opened the door and Conn said, “That is the man who sold the stuff to me.” The officers announced that the defendant was under arrest and when the defendant attempted to close the door officer Healy put his hand out to prevent it from closing and broke a pane of frosted glass in the door.
Officer Healy testified to substantially the same facts and went on to testify that he thereafter searched the defendant’s room and found $5 in marked money in the pocket of a shirt which was hanging in the closet. Healy testified that his partner found a large bag of marijuana in a refrigerator in a hallway outside the defendant’s room. It was conceded that the officers did not have a search war-ant or a warrant for the defendant’s arrest.
The defendant argues that since this was a search of the defendant’s home it was unreasonable as a matter of law since no search warrant had been obtained, regardless of whether the search might have been incident to a lawful arrest. It is argued that the officers had time to secure a search warrant and that no emergency existed requiring a *519search without a warrant. In United States v. Rabinowitz, 339 U.S. 56, 94 L. Ed. 653, 70 S. Ct. 430, it was held that the relevant test in matters involving a search was not whether it was reasonable to procure a search warrant, but whether the search was reasonable. This rule is applicable to searches of a dwelling. (People v. Jones, 31 Ill.2d 240.) The controlling question is whether a reasonable and prudent man, having the knowledge possessed by the officers at the time of the arrest, would have believed that the crime of unlawfully selling narcotics had taken place and that the defendant was guilty of the crime. People v. Hightower, 20 Ill.2d 361.
We have examined the testimony on the preliminary motion to suppress and it does not disclose the incidents leading up to the officers’ visit to defendant’s apartment. Lacking this testimony we feel that there was an insufficient showing that the evidence was seized as a result of a legal search. However, on the trial it appeared that the officers had observed Conn enter defendant’s building and deliver narcotics to another person immediately thereafter. Officer Heiser also testified that Conn said that the defendant had sold him narcotics and it seems clear that under these circumstances it was reasonable for the officers to place the defendant under arrest. The arrest being lawful, although without a warrant, it follows that the ensuing search was proper, provided that it was not unreasonably extended. It is well settled that the right of search incident to a lawful arrest is not confined to a search of the defendant’s person, but extends to the right to search the area within the defendant’s immediate control, including the premises in which the person has been arrested. (People v. Harvey, 27 Ill.2d 282.) In our opinion the search of the defendant’s closet and the refrigerator outside his door was not unreasonable.
This testimony was given prior to the introduction of the evidence obtained by the search. The question therefore *520arises whether the additional testimony at the trial prior to the introduction of the evidence obtained by the search cures the error of the trial court in denying the preliminary motion to suppress.
The requirement that a defendant move to suppress illegal evidence prior to trial is one of convenience to eliminate time consuming collateral inquiries during the trial of the principal issue. (People v. Castree, 311 Ill. 392.) It is well settled that the court’s ruling on such a motion is not final and may be changed or reversed at any time prior to final judgment. People v. Kissane, 347 Ill. 385, 387; People v. Fox, 319 Ill. 606, 609.
While the precise issue does not appear to have been decided by this court, it has recently been determined by the Supreme Judicial Court of Massachusetts in Commonwealth v. Young, (Mass. 1965) 206 N.E.2d 694. Defendant there moved to suppress evidence and a confession on the ground that his arrest was illegal. His motion was denied. The court there held: “None of the testimony of probable cause was elicited at the hearing on the motion to suppress. The showing that the police had held the defendant on suspicion was of course inadequate. But any error in respect of the motion was not prejudicial, for probable cause appeared before the confession was admitted in evidence.” 206 N.E.2d at 696.
We conclude that since the evidence at the trial established the legality of the arrest and the search in this case, defendant cannot avail himself of any error on the motion to suppress.
The only other argument advanced by the defendant was that the evidence was insufficient to establish his guilt. The testimony at the trial was that officers Heiser and Healy delivered $5 in marked money to Richard Haggart. The police observed Haggart enter a pool hall and shortly thereafter leave with Robert Conn who went to the defendant’s apartment building. A short time thereafter Conn left the building and delivered a package of narcotics to Hag*521gart. Conn was then placed under arrest and following a conversation with him the officers proceeded to the defendant’s apartment building where the arrest and search occurred as previously described. The evidence on behalf of the State showed that the money found in the defendant’s shirt pocket was the same money which had previously been given to Haggart for the purpose of making the purchase of narcotics. Conn testified that he received five $1 bills from Haggart and went to the defendant’s apartment where he purchased marijuana from the defendant and gave him the money he had received from Haggart. The defendant denied selling the narcotics to Conn and denied that the officers had found any money in his shirt pocket. The State’s evidence, if believed by the trial judge, was sufficient to establish the defendant’s guilt beyond a reasonable doubt.
We find no reversible error in the record and the judgment of the Criminal Court of Cook County is affirmed.