Backup QB David Carr has agreed to a two-year contract with the 49ers, according to a league source.
Carr spent Friday and Saturday visiting with the 49ers, but he left without a contract.
Carr is from nearby Bakersfield and played at Fresno State before becoming the No. 1 overall draft pick by the Texans in 2002. Carr spent five seasons with the Texans before stops with the Panthers (2007) and Giants (2008-09).
Carr is expected to back up Alex Smith in San Francisco.