[automerger] Fix 'potential memory leak' compiler warning. am: 37c428cd52 am: 2298edf58a

Change-Id: Ia8bdba515af702a6372f4e52edf6fc90335a2114