Merge "Fix memory-leak warnings from the static analyzer" am: 2006bfc9ad
am: 43fd84a03c

Change-Id: Id2b577a021a3163d9f489235bf7f76c5f5ae527e