If at any grade and stage of the penal trial it is evidently established that the accused did not commit the delict, the judge must declare this in a sentence and absolve the accused even if it is also established that criminal action has been extinguished.
Source: Code of Canon Law (Vatican.va)