A cannabis user stopped taking the drug after police arrested him for possession.
Christopher Graham had a small quantity of cannabis in a tin in his flat, Hartlepool Magistrates’ Court heard.
“Police executed a search warrant in a neighbouring flat where the defendant was present,” said Alison Howey, prosecuting.
“He was searched, as was his flat, which is where the drugs were found.
“The prosecution accept it was a small quantity consistent with personal use.”
Graham, 27, of Conway Walk, Hartlepool, admitted possessing a Class B drug on March 27.
Stewart Haywood, defending, said in mitigation: “Mr Graham has not been in trouble since 2009, and he has no previous convictions for drugs.
“This prosecution has brought him up short, to the point where he has now stopped smoking cannabis.
“Given his recent good record, I doubt he will trouble the courts again.”
Graham was conditionally discharged for six months, and ordered to pay £120 costs.
The cannabis was confiscated and will be destroyed.