SAN DIEGO (AP) — Buster Posey hit a two-run home run and Tim Lincecum earned his first victory of the season for the San Francisco Giants, who had only three hits in beating San Diego 4-3 Sunday to snap a three-game losing streak. Padres pitchers retired 23 of the final 24 batters and the Giants didn't get a hit after the second inning. Chase Headley hit a bases-loaded double down the right-field line in the third, with Will Venable, Seth Smith and Xavier Nady scoring. Nady originally was called safe after sliding in, but Giants manager Bruce Bochy challenged and the call was reversed, with Nady being called out. After allowing the two-run single by Pagan, Erlin retired his final 14 batters.