SAN FRANCISCO (AP) Impending free agent Mike Leake gave the Giants something to think about in his final start of the season.

Now, it's up to San Francisco general manager Bobby Evans and the rest of the team's brass to figure out whether the pitcher will be back in 2016.

Leake pitched a two-hitter for his first career shutout, and the Giants beat the playoff-bound Los Angeles Dodgers 5-0 on Wednesday night.

More from FoxSports

''It was the Mike Leake show,'' San Francisco manager Bruce Bochy said. ''He pitched very efficiently, had some short innings and gave the `pen a break.''

A day after being eliminated from postseason contention, the Giants jumped to an early lead, then rode Leake to beat the Dodgers for the eighth time in nine games at AT&T Park.

Leake (11-10) struck out one and walked three to win for just the second time in nine starts since being acquired in a trade from Cincinnati on July 30. He faced only three over the minimum.

''I had a pretty clear mind today,'' Leake said. ''It also helped getting off to an early lead and jumping on them.''

Leake said he'd like to figure out quickly where he'll be pitching in 2016. Bochy sounded optimistic about Leake re-signing with the Giants, while the pitcher said he is also open to returning.

''It depends on what they have to say to me in these next few days or whenever they plan to start talking to me,'' Leake said. ''It also depends on what my agent and my family talk about. It's a strong possibility that this is a place I'd like to play. You never know what's going to happen. Time will tell.''

Jimmy Rollins singled in the fourth for the Dodgers, who remain one game behind the New York Mets for the No. 2 seed in the NL. The two teams will play each other in the NL Division Series, though homefield advantage for that showdown has yet to be decided.

Matt Duffy had three hits, including a two-run home run, while Nick Noonan hit his first career homer for the Giants, who have won four of five.

The game drew another sellout crowd to the Giants' waterfront ballpark, but had far less emotion than Tuesday's contest, which ended with Los Angeles players celebrating their third consecutive NL West title in the defending World Series champions' stadium.

There was no celebration this time, though the Giants relished playing spoiler to their long-time rivals by keeping them behind the Mets.

Duffy hit his 12th home run of the season in the first after Kelby Tomlinson drew a one-out walk off Dodgers starter Mike Bolsinger (6-6). Duffy, who went into the game leading all NL rookies in hits, also singled in the sixth and in the ninth.

Angel Pagan reached on an infield single in the third when Bolsinger was late covering the bag, and Tomlinson followed with an RBI double into the right field corner to make it 2-0.

Noonan homered off Joel Peralta in the seventh.

Bolsinger gave up three runs and four hits in 3 1-3 innings. He struck out seven and walked two but remained winless since Sept. 4.

''The slider was my one good pitch that was working,'' Bolsinger said. ''I did something good with the seven strikeouts, but you can't get by with one pitch.''

TRAINER'S ROOM

Dodgers: Yasiel Puig faced live pitching but has not yet been cleared to run the bases. Puig has been out since Aug. 28 with a hamstring injury.

Giants: 1B Brandon Belt underwent surgery to repair a torn meniscus in his right knee. Belt, who hasn't played since Sept. 18, has been sidelined with a concussion and recently visited concussion specialist Dr. Michael Collins in Pittsburgh. He's expected to be recovered in time for spring training. ... INF Nori Aoki is also meeting with Collins to see if he can be cleared to return before the season ends.

UP NEXT

Dodgers: LHP Brett Anderson (9-9) pitches against San Francisco on Thursday afternoon. Anderson has beaten the Giants just once in eight previous career starts.

Giants: RHP Tim Hudson (8-8) will make the final start of his 17-year career in the series finale. Hudson, a four-time All-Star, has 222 career wins, including two against the Dodgers this season.