San Francisco Giants Tim Lincecum, right, leaves the game during the second inning of a baseball game against the Colorado Rockies, Saturday, June 27, 2015, in San Francisco. At left is Giants trainer Dave Groeschner. (AP Photo/George Nikitin)

SAN FRANCISCO | Giants right-hander Tim Lincecum was hit in his pitching elbow by a line drive Saturday and left the game against Colorado.

San Francisco Giants Tim Lincecum, right, leaves the game during the second inning of a baseball game against the Colorado Rockies, Saturday, June 27, 2015, in San Francisco. At left is Giants trainer Dave Groeschner. (AP Photo/George Nikitin)

Lincecum was struck by DJ LeMahieu’s liner in the second inning. The ball deflected to first baseman Buster Posey, who threw home to get Chris Rusin trying to score.

Lincecum walked around the mound after being hit and quickly exited. Yusemeiro Petit replaced him.