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

Change-Id: I25e3d526bb3f09c826d204909ea1763af4eb951d