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

Change-Id: I98df60cfed36c714dae1fa4218d3c5ef23c4035c