Giants' starter Barry Zito (14-8) went six innings, allowing three runs on six hits with three walks and three strikeouts, and picking up his sixth straight win.
Buster Posey went 2-for-4 with one run scored and Hector Sanchez hit a solo home run in the eighth inning for the NL West-champion Giants.
Posey improved his batting average to .333 -- just ahead of Pittsburgh's Andrew McCutchen in their battle for the NL batting title. McCutchen was hitting .332 after going 0-for-4 against the New York Mets Thursday.
Diamondbacks starter Patrick Corbin (6-8) slowed six runs on seven hits over three innings.
Chris Young drove in two runs for Arizona, which has lost three of its last four games.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Beyonce flaunts bikini body, Blue Ivy in vacation pics