Andrei Martsinchyk reported a bug with a fix.
GTM never pfrees pstrdup'ed value of gti_coordname, and therefore leaks memory in the TopMostMemoryContext.
Please find fix attached. The patch is made against the master branch, but applies to STABLE branches, to 1_0 with offsets.
There were two places where GTM_TransactionInfo was cleaned up, so the code was pulled out into a separate function, for easier maintenance.
The patch fixes the issue.