fix a small memory leak in transaction_order()