[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d

Change-Id: I2e9d6b1a5badb501adc641b17ce337c911d09610