SAN DIEGO (AP) -- Greg Maddux is back to winning after a long dry spell.
Maddux (5-8) won his second straight after having gone through a career-high 14-game winless streak since victory No. 350 on May 10 against Colorado.
"I think I've thrown enough good games during that stretch to not reinvent the wheel," Maddux said. "There is struggling, there is not feeling comfortable, and there's not winning. Those are totally different things.
"I felt good about how I was throwing the ball. I didn't win some games you would normally win."
Maddux won consecutive games for the first time since victories at San Francisco and at the Los Angeles Dodgers on April 7 and 13.
"Greg bases a lot of his work on his performance and he was throwing the ball well," Padres manager Bud Black said. "Because of his experience, his head, he might not let that stretch affect him like a younger pitcher would. He kept doing the same things every five days."
"He was really impressive," said rookie catcher Nick Hundley. "He was really pounding the zone and throwing strikes. It was fun to watch."
Hoffman pitched the ninth for his 23rd save in 26 chances and career save No. 547.
Maddux helped himself when he tied the score at 1 in the second inning with a single, his first RBI in nearly two years. Hundley was hit by a pitch with one out and went to second on a walk before scoring on Maddux's line drive to right off Kevin Correia (2-6).
"It was nice to help for a change," Maddux said. "Sometimes they hit your bat."
"I just kind of got out of rhythm there," Correia said. "I was just trying to find the strike zone and I ended up throwing it up and away. It was a pitch that a pitcher can handle."
Maddux, hitting .108 this season, drove in his first run since he had two RBIs against Cincinnati on Aug. 30, 2006, when he was with the Los Angeles Dodgers.
"He does what he's been doing for 20 years," Correia said. "When he gets an RBI on top of that, it's hard to beat him."
Maddux is 7-0 in his last 13 starts against the Giants. His last loss to San Francisco was a 9-2 decision on June 9, 2003, at Atlanta.
"We had a real tough time against Maddux," Giants manager Bruce Bochy said. "He's had our number and today he did it again."
The win moved Maddux to within three games of passing Roger Clemens for eighth on the all-time list.
The Padres broke a four-game losing streak and prevented San Francisco from sweeping the three-game series.
San Diego scored the go-ahead run on Hundley's sacrifice fly in the sixth inning off Correia.
The Padres added a run in the seventh on Brian Giles' two-out single that scored Jody Gerut, who reached on a double, and another in the eighth on Kevin Kouzmanoff's 420-foot leadoff homer against Osiris Matos, his 15th.
Correia allowed two runs on three hits over 6 1/3 innings.
Correia helped San Diego push across the go-ahead run in the sixth after he gave up a leadoff double to Giles. He walked two batters with one out to load the bases and set up Hundley's sacrifice fly.
Maddux raised his career record 30-14 against San Francisco. ... When Hundley threw out John Bowker attempting to steal second base in Saturday night's game, it marked the third consecutive base stealer nabbed by San Diego catchers. The last time the Padres did that was June 11, 2006, against Florida. For the season, Padres catchers have thrown out only 16.2 percent (24 of 148) of potential base stealers.