Jeff Samardzija lasted just 4.2 innings Saturday, but Buster Posey picked him up with a walk-off hit in the 10th to lift the Giants past the Dodgers.