If this ha already happened it is too late to change it, but the correct answer would have been to either say nothing at all, or to tell him you have always been told not to talk to the police and then say nothing.As it stands now the police officer will likely say you consented to giving him the pot, and then he was legally justified in doing the further search of the car.Had you said nothing it would likely have been much harder for him to justify the search later in court.That does not mean that you might not be able to win the case, but I would need to know more specific facts and review the police report before I could give you an opinion about that.If you wish to try and win the case you will need to speak to an attorney who is good in search and seizure issues.