SAN FRANCISCO -- Buster Posey drove in a run, Tim Hudson allowed five hits over 6 1/3 innings and the San Francisco Giants won their fourth straight, beating the Los Angeles Dodgers 2-0 on Tuesday night.
Joe Panik and Angel Pagan had two hits each for the Giants, who have won 11 of their past 14 home games.
Alex Guerrero had two hits for the Dodgers, who have lost four of six overall and five of seven to the Giants.
Hudson (2-3) did not allow a run for the first time since his first start of the season on April 9. He walked two and struck out two.
Carlos Frias (3-1) retired the first two batters of the third inning before consecutive singles from Panik, Pagan and Posey, who has an 11-game hitting streak, produced a run.
Sergio Romo, the Giants' fourth pitcher of the seventh inning, retired Howie Kendrick on a comebacker with the bases loaded to keep the shutout intact.
Romo got four outs and Santiago Casilla pitched the ninth for his 10th save in 12 chances.
Frias limited the Giants to one run and seven hits over six innings. He walked two and struck out three.
Frias drew a walk in the second inning, reaching base safely for the first time in his career. Hudson walked the opposing pitcher for the 12th time in his 17-year career, the first six in the American League.
Hunter Pence went 0 for 4 in his first home game of the season. He did make a highlight reel catch to rob Adrian Gonzalez of extra bases in the sixth.
Dodgers: LHP Hyun-Jin Ryu will decide Wednesday whether to undergo surgery on his left shoulder, which has not responded to rest and treatment. He's been out since spring training. He was to consult with Dodgers team doctors on Tuesday. ... RHP Brandon Beachy is closer to returning to action following Tommy John surgery last year. He threw a bullpen session Monday and reported it was one of his better ones. "He's making progress," Dodgers manager Don Mattingly said. "Mentally he's moving forward. He's getting closer and closer to games."
Giants: RHPs Jake Peavy and Matt Cain threw bullpen sessions. Cain started throwing breaking balls. Giants manager Bruce Bochy said the team will decide Wednesday on Peavy's immediate future, though he indicated the possibility of a rehab start in San Jose.
Dodgers: LHP Brett Anderson (2-1, 3.50) pitches against the Giants on Wednesday. It will be his 100th career appearance (89th start) and sixth against the Giants. He's 0-3 with a 6.10 ERA against them.
Giants: RHP Tim Lincecum (3-2, 2.43) makes his third start against the Dodgers this season. He's 10-8 with a 3.45 ERA in 28 games against them.