Matt Olson singled with one out in the ninth against Melancon (3-9) and scored when Riley’s double hit the fence in right-center on two hops. Olson slid headfirst, easily beating the throw.
Jansen (5-0) walked pinch-hitter Alek Thomas with two outs in the top half but was caught stealing second by catcher Travis d'Arnaud when Thomas took a foot off the bag after passing the base with a headfirst slide.
Atlanta had lost eight of its last previous series finales. The Braves have swept six series this season but were just 1-5 in their prior six chances to sweep.
The Braves are 39-14 since June 1, the best record in the majors over that span. They stayed three games behind the NL East-leading New York Mets.
Atlanta is a big league-best 47-8 when scoring first.
Fried, an All-Star who has a 2.09 ERA over his last eight starts, allowed four hits and two walks with five strikeouts in seven innings.
Arizona’s Merrill Kelly gave up three hits and two walks in seven innings with eight strikeouts, He lowered his ERA to 1.31 over his last six starts.
LIFE OF RILEY
Riley’s second double broke was his 27th extra-base hit of the month, passing Hank Aaron in July 1961 for most extra-base hits for the Braves in a month. Riley leads the majors with 61 extra-base hits.
McCarthy caught William Contreras‘ flyball in the left-field corner in the second but dropped the ball as he tried to transfer it to his glove while running into the wall. With runners on first and second, McCarthy threw to shortstop Geraldo Perdomo, who relayed third baseman Josh Rojas for one out. Rojas threw to second for the second out of the inning-ending double play.
Braves: Open a two-game home series against Philadelphia on Tuesday.
Diamondbacks: Start a series Monday at Cleveland.