This commit fixes potential memory leak at GTM.   Andrei Martsinchyk
reported this bug and provided the fix.