Locke (6-1) struck out five and walked only one before turning things over to Mark Melancon in the eighth.
Melancon gave up two hits without allowing a run, after which Jason Grilli came on in the ninth to collect his 24th save.
Grilli allowed the first two batters to reach base in the ninth before retiring the next three, striking out two of them.
The loss went to Stephen Fife (1-2), who allowed two runs on six hits in five innings.
Beyonce flaunts bikini body, Blue Ivy in vacation pics
Couple mistakenly served bag of cash at McDonald's drive-thru