You were so lucky. I've known people that were arrested in a similar situation just for being there. That is why they say you should know everyone you associate with. It's a good thing he wasn't involved in organized crime. They could have gotten you on RICO. Though many of those cases aren't convicted, being run through the mill with a RICO charge can be costly and leave you feeling worthless and resentful.
If I have someone ride with me, which isn't often, and I ever find out they have even the smallest amount of pot on them, I will leave them on the side of the road, regardless of how far out we are. And, if they don't leave my vehicle peacefully, I have 30 small reasons they should, all about 9mm in size. Never get in my vehicle, or come into my home, with drugs. Had that happen 10 years ago when living in my parents' pool house. Some "friends" came over with some shady guy, and they, one at a time, would go to the bathroom, not flush, and come out. I ran them all off. Never heard from them again. 1: they didn't share; 2: they didn't tell me they had anything; 3: I had quit doing what they had years before. I think I scared all 4 of them when I ran them off.