8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Fix memory leaks in external triggers examples.

This commit is contained in:
Adriano dos Santos Fernandes 2021-05-05 11:18:52 -03:00
parent 054431fce7
commit b76a05ee5f

View File

@ -199,7 +199,7 @@ FB_UDR_BEGIN_TRIGGER(replicate)
FB_UDR_EXECUTE_TRIGGER
{
ITransaction* transaction = context->getTransaction(status);
AutoRelease<ITransaction> 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<ITransaction> transaction(context->getTransaction(status));
stmt->execute(status, transaction, triggerMetadata, newFields, NULL, NULL);
}