Skip to content

Commit

Permalink
This should fix CORE-4676: Crash on unexpected client disconnection w…
Browse files Browse the repository at this point in the history
…ith opened transaction.
  • Loading branch information
dyemanov committed Jan 29, 2015
1 parent 1cb23c7 commit 7fe133a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/jrd/jrd.cpp
Expand Up @@ -5479,6 +5479,13 @@ static void release_attachment(thread_db* tdbb, Attachment* attachment)
if (dbb->dbb_event_mgr && attachment->att_event_session)
dbb->dbb_event_mgr->deleteSession(attachment->att_event_session);

if (attachment->att_dsql_instance)
{
MemoryPool* const pool = &attachment->att_dsql_instance->dbb_pool;
delete attachment->att_dsql_instance;
dbb->deletePool(pool);
}

// CMP_release() advances the pointer before the deallocation.
jrd_req* request;
while ( (request = attachment->att_requests) )
Expand Down Expand Up @@ -5521,13 +5528,6 @@ static void release_attachment(thread_db* tdbb, Attachment* attachment)

delete attachment->att_compatibility_table;

if (attachment->att_dsql_instance)
{
MemoryPool* const pool = &attachment->att_dsql_instance->dbb_pool;
delete attachment->att_dsql_instance;
dbb->deletePool(pool);
}

SCL_release_all(attachment->att_security_classes);

delete attachment->att_user;
Expand Down

0 comments on commit 7fe133a

Please sign in to comment.