8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

An attempt to fix #7504: Segfault when closing SQL statement in remote provider during shutdown

This commit is contained in:
AlexPeshkoff 2023-03-14 17:51:42 +03:00
parent eb4dbb1465
commit bb787acf13

View File

@ -8773,7 +8773,7 @@ static void release_request( Rrq* request)
}
static void release_statement( Rsr** statement)
static void release_statement( Rsr** statementPtr)
{
/**************************************
*
@ -8786,18 +8786,20 @@ static void release_statement( Rsr** statement)
*
**************************************/
delete (*statement)->rsr_bind_format;
if ((*statement)->rsr_user_select_format &&
(*statement)->rsr_user_select_format != (*statement)->rsr_select_format)
{
delete (*statement)->rsr_user_select_format;
}
delete (*statement)->rsr_select_format;
(*statement)->releaseException();
Rsr* statement = *statementPtr;
*statementPtr = NULL;
REMOTE_release_messages((*statement)->rsr_message);
delete *statement;
*statement = NULL;
delete statement->rsr_bind_format;
if (statement->rsr_user_select_format &&
statement->rsr_user_select_format != statement->rsr_select_format)
{
delete statement->rsr_user_select_format;
}
delete statement->rsr_select_format;
statement->releaseException();
REMOTE_release_messages(statement->rsr_message);
delete statement;
}