Locke (4-1) allowing just three hits over seven shutout frames in posting his fifth quality start in six outings since taking the starting rotation spot of the injured James McDonald. The left-hander walked two and struck out four as the Bucs took the rubber match of a three-game series.
Pedro Alvarez knocked a solo homer in the fifth, providing the game's only run.
Houston's Lucas Harrell (3-5) absorbed the hard-luck loss, yielding just one run on four hits over seven innings. The right-hander walked one and fanned three.