For example, could a law that legalizes a drug retroactively free people previously convicted on charges for that drug so long as they didn't break any other laws? I know laws can't retroactively punish someone, but can they do the reverse?
"The law" cannot offer a pardon, but an executive might. For instance, the governor of a state often has the power to grant pardons for state convictions, therefore a governor can pardon e.g. those convicted on state misdemeanor marijuana possession charges. Such a pardon is not automatic and is not guaranteed, hence in Washington, it took almost 7 years for the governor to offer a procedure for applying for pardon, subsequent to the state's limited legalization in 2012. It can also be done by legislative act (as was done after the governor announced the pardon program), where a law was passed allowing certain people convicted of certain marijuana offenses to apply to the court to have the conviction vacated. A legislature can also pass a law vacating a conviction when the underlying act remains illegal, for example prostitution is still illegal in Washington, but in a specified subset of cases, certain people can have their convictions vacated. In other words, it requires specific executive or legislative action.
As a general rule assume no
- when a law is abolished, the conditions under which previous convictions are to be delt with can be determined, but must not be
In the case of §175 in Germany, no conditions were set
- so no further charges, but existing convictions remainded as is
At a later point of time it was desided that the nullification could be applied for.
See the chapter Pardon of the victims in the wiki article
Germany §175 StGB