In each of these two movies, the real bad guy is revealed well before the climactic events of the story take place, which means that they (the climactic events) could possibly have been avoided altogether.
For example, in PoA Harry tells Lupin that he saw Peter Pettigrew on the map before Buckbeak's execution, which should have given Lupin ample time to figure out what was really going on and tell Dumbledore what he knew (or suspected). Then maybe (assuming Fudge didn't get in their way, which is assuming a lot) they could have captured Pettigrew and cleared Sirius' name.
In GoF, Harry tells Dumbledore that, in his dreams/visions, he saw Barty Crouch Jr. working for Voldemort. Assuming that Snape told Dumbledore that someone was stealing Polyjuice Potion ingredients from his stores, the Dumbledore that I know and love could have easily put two and two together and stopped pseudo-Moody before the final task. And it's hard to imagine Snape not mentioning it to Dumbledore since he thought Harry was behind it and when has he ever missed an opportunity to try to undermine Dumbledore's good opinion of Harry?