Fix problems found by static analysis.

Change-Id: I02c51279f18f629b2d2fb1095692a6ae98b0e25e
13 files changed