From b76a05ee5f155c28d28425ae7550107eb059e7cc Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Wed, 5 May 2021 11:18:52 -0300 Subject: [PATCH] Fix memory leaks in external triggers examples. --- examples/udr/Triggers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/udr/Triggers.cpp b/examples/udr/Triggers.cpp index d90e637ee1..4e9bcca834 100644 --- a/examples/udr/Triggers.cpp +++ b/examples/udr/Triggers.cpp @@ -199,7 +199,7 @@ FB_UDR_BEGIN_TRIGGER(replicate) FB_UDR_EXECUTE_TRIGGER { - ITransaction* transaction = context->getTransaction(status); + AutoRelease transaction(context->getTransaction(status)); // This will not work if the table has computed fields. stmt->execute(status, transaction, triggerMetadata, newFields, NULL, NULL); @@ -306,7 +306,7 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons) FB_UDR_EXECUTE_TRIGGER { - ITransaction* transaction = context->getTransaction(status); + AutoRelease transaction(context->getTransaction(status)); stmt->execute(status, transaction, triggerMetadata, newFields, NULL, NULL); }