Of course. Not all systems are fool-proof and works 100% efficiently. There has been some cases where the death penalty had already been used, and the victim was found innocent afterwards. Generally a reparation is given to the family. If a less harsh sentence was given out (such as a prison sentence), there is a rate reparation given based on the wasted time, as well as the clearance of record (criminal record).
~