Tim Lincecum allowed five runs in 4.2 innings to put the Giants in an early hole, and the Padres held on, despite a late San Francisco rally, to win 6-3 and salvage a win in the three-game series.