
56 Cal.2d 471 (1961)
THE PEOPLE, Plaintiff and Respondent,
v.
JAMES P. VAN EYK, Defendant and Appellant.  [fn. *]
Crim. No. 6889. 
Supreme Court of California. In Bank.  
Aug. 10, 1961.
 Cary G. Branch for Defendant and Appellant.
 Stanley Mosk, Attorney General, William E. James, Assistant Attorney General, and Philip C. Griffin, Deputy Attorney General, for Plaintiff and Respondent.
 GIBSON, C. J.
 Defendant was indicted for conspiring to commit the crime of possession of narcotics and was found guilty by a jury. He contends that illegally obtained evidence was used in securing the conviction, that the evidence is insufficient to show the alleged conspiracy, that the court erred in instructing the jury, and that he was not brought before a magistrate within the time prescribed by law.
 Officer Sanchez of the Los Angeles Police Department was the principal witness for the prosecution. He testified that an apartment occupied by Robert Hernandez and Helen Levario was kept under surveillance for about two weeks and that by stationing himself nearby he was able to overhear conversations and observe the participants.
 On September 2, 1959, defendant came to see Hernandez and, finding him absent, left a telephone number with Miss Levario for him to call. Defendant said he wanted to contact Hernandez in order to get some heroin "for the guys," who were complaining about nondelivery. Later the same day Jose Escobedo told Hernandez he wanted 4 ounces of heroin right away, and Hernandez said, "Give me the money and I'll go make the phone call." The two men left the apartment and went across the street to a telephone booth, where Hernandez placed a call. During a visit on September 6, Escobedo asked for 6 ounces of heroin and gave money to Hernandez, who *475 said, "We'll go make the phone call." The following day Escobedo told Hernandez and Miss Levario that he was delivering from 10 to 20 ounces of heroin a week to others and that he was doing all the work and did not see why he should pay Chente (an unidentified man) $350 a week for doing nothing. Hernandez replied, "Well, it's his operation, it's his business and he started it, and I don't think I should cut him out."
 Defendant came to the apartment on September 8 with Barbara Christensen and had a conversation with Hernandez and Miss Levario. He said to Hernandez, "As long as you keep me in stuff, I'm going to be driving a Coupe de Ville." He also said that he had "two guys dealing" for him "downtown" and two in Inglewood and that he was "going to put another man into Wilmington."
 On September 12 Miss Levario asked Hernandez to call "Glenn" and tell him to bring some heroin because she "wanted a fix real bad." When Hernandez refused, she left the apartment. Hernandez went across the street and made a telephone call. Shortly thereafter, Glenn Symons came to the apartment and handed him a package, saying, "I scored again." Defendant arrived with Miss Christensen and said he wanted 10 ounces of heroin for the next day. He asked Hernandez to "call the man right now," and Hernandez answered that it was too late and that defendant should come there the next morning. In the course of the conversation Hernandez said that he had seen police in the vicinity and that he was going to have to move out, and defendant stated, "Man, you sure had a bad year this year, Bob.pato got busted, and Bernice and Louie." Defendant also remarked, "I'm going to retire in about five years if things keep going the way they are," and Symons said, "Yes, you're either going to retire or you're going to retire to the joint for five years."
 The following morning defendant came to the apartment, asked Hernandez if the 10 ounces of heroin were ready, and remarked that "these guys" were complaining about nondelivery. He said, "Let's go make a phone call ... don't have the guy put it all down in one phone booth." Upon being asked by Hernandez whether he had the money, defendant replied, "Yes, here it is." Hernandez again commented that the police were in the area, and they discussed whether Hernandez should move to South Pasadena, where defendant had an apartment. When Hernandez said that the rent paid by *476 defendant was too high, defendant replied, "... with your money you could rent ten pads like that ... I've got three pads myself. I've got one where my girl friend and I live, in South Pasadena. I've got one for my p.o. officer, with a few rags in there, so when he comes and looks me up, I don't look too prosperous. Then I've got my warehouse where I keep my stuff stashed." After the conversation the two men left and drove away together.
 Officer Sanchez knew the address of defendant's apartment in South Pasadena and was aware that Miss Christensen lived with him there, but he did not know where defendant's "warehouse" was located. At the direction of Sanchez two other officers arrested defendant and Miss Christensen, without a warrant, at the South Pasadena address about 11:40 p.m. on September 13, on the charge of possessing narcotics. Sanchez had told the arresting officers to look for narcotics and a rent receipt indicating some other place where defendant might have hidden narcotics. In the pocket of a man's coat hanging in the closet of the apartment the officers found a receipt, dated September 13, which read, "Received from Jack Davis, $3.50, from September 13 to September 14." It bore the signature "G. R. Waddle," but there was no name or address of a hotel or any other establishment. Defendant and Miss Christensen were taken into custody and were booked, and at that time several keys were taken from defendant and left with the property clerk, in accordance with usual procedure. The receipt was given to Sanchez, who, on September 14 and part of September 15, sought unsuccessfully to determine where G. R. Waddle worked.
 On the afternoon of September 15 defendant and Miss Christensen were ordered released from custody, and about the same time the police succeeded in tracing G. R. Waddle, who was the manager of a Los Angeles hotel. He identified defendant as "Jack Davis" from a photograph and he, as well as the owner of the hotel, gave the police permission to enter the room defendant had rented. Under the bed they found a locked suitcase which had the initials of defendant's wife on it. Defendant and Miss Christensen, who had been rearrested, were brought to the hotel, and, when defendant refused to say which of the several keys belonging to him would open the suitcase, Sanchez tried the keys until one unlocked it. Inside were $30,000 worth of narcotics and paraphernalia commonly used to administer drugs. On the way from the hotel to jail defendant said, "Well, you know, this *477 is the most stuff that I have ever had in my whole life, and I had to get busted behind it. I'll probably do a long stretch this time."
 On September 16 defendant and Miss Christensen were arraigned on the charge of possessing narcotics, and at the preliminary hearing they were held to answer. They moved the superior court to set aside the information under section 995 of the Penal Code on the ground that they had been committed without probable cause in that the evidence used against them had been illegally obtained. The motion was granted. They were again arrested, and, while the preliminary hearing was pending, the indictment for conspiracy to commit the crime of possession of narcotics was returned by the grand jury against defendant, Miss Christensen, Hernandez, Symons, Escobedo, and Miss Levario. Miss Christensen was tried with defendant, and she was acquitted by the jury which found him guilty. With respect to the others, it is not clear what occurred, except that the indictment was dismissed as to Symons on motion of the prosecution, apparently because he had already been convicted of an offense arising out of transactions connected with the alleged conspiracy.
 Defendant did not take the stand and did not introduce any evidence to controvert the facts set forth above.
 [1] The untenable contention is made by defendant that, in view of the order setting aside the information in the action charging him with possession of narcotics, the doctrine of res judicata is available to establish that the evidence introduced against him here, which is the same as that involved in the prior action, was illegally obtained. Section 999 of the Penal Code provides, "An order to set aside an indictment or information, as provided in this chapter, is no bar to a future prosecution for the same offense." In People v. Prewitt, 52 Cal.2d 330, 340 [341 P.2d 1], where a magistrate at a preliminary hearing had dismissed a complaint, determining that the evidence was illegally obtained, we held, citing section 999, that res judicata did not apply in a subsequent prosecution. Insofar as People v. Mora, 120 Cal.App.2d 896, 899-900 [262 P.2d 594], is to the contrary, it is disapproved.
 [2] What Sanchez overheard and saw while watching the apartment of Hernandez obviously constituted probable cause for defendant's arrest on a charge of possessing narcotics. [3] The police found the receipt in defendant's apartment at the time of his arrest, and it was not discovered as the *478 result of a general or exploratory search but at the specific direction of Sanchez, who had reason to believe that such a receipt might be there. The receipt, which would have assisted defendant in establishing his right to the suitcase left at the hotel in the event of a dispute with the management, could reasonably be considered as a means of committing the crime. (Cf. Marron v. United States, 275 U.S. 192, 199 [48 S.Ct. 74, 72 L.Ed. 231].) Accordingly, its seizure was proper under the rule that a reasonable search of the area under the control of the accused to obtain things used as a means of committing the crime is justified as an incident to his arrest. (People v. Martin, 45 Cal.2d 755, 762 [290 P.2d 855]; In re Dixon, 41 Cal.2d 756, 761-762 [264 P.2d 513].)
 [4] The record is sufficient to show that the hotel room in which the narcotics were found on September 15 was no longer defendant's room. He rented it on September 13, paying for one day only, and the receipt given him described the duration of his tenancy as "from September 13 to September 14." The owner of the hotel testified that, had the opportunity arisen, the room would have been rented to another as of September 14. Defendant's tenancy could be found to have expired before the search was made, and the manager of the hotel was entitled to permit the police to enter and search the room. (Cf. People v. Crayton, 174 Cal.App.2d 267, 269 [344 P.2d 627].) [5] There was probable cause to believe that the suitcase belonged to defendant and contained narcotics, and there was obviously a connection between the arrest and the seizure. The rent receipt which led the police to the hotel was found as an incident to the arrest, the key used to open the suitcase was one of several properly taken from him at the time of the arrest, and the police, since that time, had made continuous efforts to locate the hotel room. It should also be noted that the object of their search was not merely evidence to be used against defendant but was contraband. Under the circumstances the police acted lawfully in seizing the narcotics, and this evidence, as well as the rent receipt, was properly admitted.
 [6] A criminal conspiracy exists when two or more persons agree to commit a crime and do some overt act in furtherance of the agreement. (Pen. Code,  182, 184.) [7a] When all inferences favorable to the prosecution are drawn, the evidence discloses the existence of a narcotics ring whose ultimate objective, shared in by a number of people performing *479 various functions, was to bring narcotics into the possession of addicts for profit. The sale by Hernandez to defendant was merely one of several steps in carrying out the common objective. Defendant was supplying the narcotics to others, who sold them to users, and Hernandez was obviously aware of this. Hernandez in turn was supplying not only defendant but others as well by arranging for their acquisition of narcotics with some unknown person or persons, and defendant knew that Hernandez was engaged in such activities. An unidentified man called "Chente" organized the operation, and the evidence indicates that Escobedo, Miss Levario and Symons, in addition to unidentified persons referred to as "Pato," "Bernice" and "Louie," took some part in the conspiracy, although their roles are not clear in all respects. [8] It has been held that persons can be prosecuted as conspirators if, by buying, selling, or doing some other act, they knowingly participated in a general plan to place narcotics in the hands of ultimate users. (United States v. Aviles, 274 F.2d 179, 188; Leyvas v. United States, 264 F.2d 272, 273 et seq.; United States v. Rich, 262 F.2d 415, 417-418; United States v. De Fillo, 257 F.2d 835, 838.) [9] The fact that defendant may not have personally known the identity or exact functions of all the members of the conspiracy is immaterial. (People v. Buffum, 40 Cal.2d 709, 725 [256 P.2d 317].) [7b] The evidence is sufficient to support the verdict against defendant.
 [10] In one of its instructions the court, after telling the jury that defendant was charged with conspiring to violate sections 11500 and 11530 of the Health and Safety Code, purported to read those sections "as concerns this case." The sections, as read by the court, referred not only to possession of narcotics but to various other offenses, such as sale and transportation. This was error because, as a result of amendments made shortly before the transactions in question, the other offenses mentioned by the court were not included in either section. However, there is no sound basis for holding, as urged by defendant, that the error may have confused the jurors and caused them to find defendant guilty of a conspiracy to commit some offense other than possession. The instruction was immediately followed by one which discussed what must be shown to establish possession, thus singling out that offense from among the others mentioned in the general instruction relating to the provisions of the code. Moreover, *480 the indictment, which was read to the jury, made it clear that possession was the substantive offense that was the object of the alleged conspiracy, and the verdict found defendant guilty as charged.
 It is also urged that defendant has been denied due process because, assertedly, there was a violation of sections 825 and 849 of the Penal Code, which provide that after an arrest the accused must be brought before a magistrate "without unnecessary delay."  [fn. 1] [11] The rule is settled that evidence obtained during an illegal detention is admissible unless the relationship between the detention and the obtaining of the evidence is such that its use renders the trial unfair. (Rogers v. Superior Court, 46 Cal.2d 3, 9-11 [291 P.2d 929]; in accord see People v. Bashor, 48 Cal.2d 763, 765 [312 P.2d 255].) [12] Defendant argues that had he not been held in custody on September 14 and the morning of September 15, he could have removed the suitcase from the hotel room before the police found it. This argument ignores the substantial likelihood that if the police had released defendant prior to locating the hotel, they would have kept him under surveillance so that he would have led them to the narcotics or, by using the rent receipt, they would have found the narcotics before he was able to dispose of them. We are satisfied that defendant's detention cannot be said to have resulted in an unfair trial.
 Other contentions made by defendant are completely lacking in merit and need not be discussed.
 The judgment and the order denying a new trial are affirmed.
 Traynor, J., Schauer, J., McComb, J., Peters, J., White, J., and Dooling, J., concurred.
 Section 849 of the Penal Code provides in part, "When an arrest is made without a warrant by a peace officer or private person, the person arrested, if not otherwise released, must, without unnecessary delay, be taken before the nearest or most accessible magistrate in the county in which the offense is triable, and a complaint stating the charge against the arrested person, must be laid before such magistrate."
NOTES
[fn. *]  *. Previously entitled, "People v. Symons."
[fn. 1]  1. Section 825 of the Penal Code provides in part, "The defendant must in all cases be taken before the magistrate without unnecessary delay, and, in any event, within two days after his arrest, excluding Sundays and holidays."
