Locke (2-1) yielded just two hits and a pair of walks as the Pirates reeled off their fourth victory in five games.
Jason Grilli struck out two batters in the ninth inning en route to his eighth save of the season.
Phillies starter Cole Hamels (0-3) pitched well in the loss, allowing two runs on seven hits and a walk over eight innings. The left-hander struck out six.
Mena Suvari shares her delightfully awkward Christmas card photo
Ohio crash that killed two caught on camera [VIDEO]