California's new recreational cannabis law is doing more than legalizing marijuana sales going forward. It's also allowing thousands with past pot convictions to clear their criminal records.

A little known provision in Proposition 64 allows people convicted of almost any marijuana crime to have it removed or reduced. According to the California Judicial Council, more than 4,000 people have already filed petitions.

The law takes effect Jan. 1.

For those with pot convictions, all they need to do is reach out to the court that processed their case.

"In some jurisdictions, you can apply to the district attorney's office, and they will help you do it," said Leslie Jacobs, a professor at McGeorge School of Law. "So that's what they should do is some internet research or visit the district attorney's office and say I think Im eligible."

Many of the marijuana convictions in California came during the so-called war on drugs period, which critics say disproportionately impacted minority communities.