CAL. PEN. CODE § 833 : California Code - Section 833

A peace officer may search for dangerous weapons any person whom he has legal cause to arrest, whenever he has reasonable cause to believe that the person possesses a dangerous weapon. If the officer finds a dangerous weapon, he may take and keep it until the completion of the questioning, when he shall either return it or arrest the person. The arrest may be for the illegal possession of the weapon.