This is an additional patch to fix the bug 3598637.   The patch corrects
the lock to relase, as well as restoring memory context at error.

	modified:   src/gtm/main/gtm_txn.c