Thanks mostly to its opportunistic defense creating four turnovers, San Francisco moved its record to 3-2 with a second straight victory.