Wiltshire police said, when stopped by officers, Comrie gave two false names initially, one of which was a wanted man from Bristol.
An initial search was carried out due to Comrie’s suspicious behaviour and he was found to be in possession of cannabis and cash.
A further search while in custody found he had a phone, a large amount of cocaine and heroin hidden in his underwear.
An inspection of the phone found he had messages relating to drug supply.
PC Lauren Vincent said: “Comrie was found with a total of 46 wraps of class A drugs hidden in his pants, and a phone which he used to arrange and facilitate the supply of class A drugs in the Swindon area.”
“I am pleased we have been able to intercept this chain of supply and prevent these drugs reaching the hands of vulnerable users in our communities,” she added.