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

Fixed regression caused by previous commit - segfault when unwinding half-done attachment

This commit is contained in:
AlexPeshkoff 2020-07-09 19:17:16 +03:00
parent bcd6ca8262
commit ffed50db79

View File

@ -6483,7 +6483,7 @@ static void release_attachment(thread_db* tdbb, Jrd::Attachment* attachment)
break;
}
if (!(other || crypt_att))
if (dbb->dbb_crypto_manager && !(other || crypt_att))
dbb->dbb_crypto_manager->terminateCryptThread(tdbb, false);
cryptGuard.leave();
@ -6493,6 +6493,7 @@ static void release_attachment(thread_db* tdbb, Jrd::Attachment* attachment)
sync.unlock();
CRYPT_DEBUG(fprintf(stderr, "crypt_att=%p terminateCryptThread\n", crypt_att));
fb_assert(dbb->dbb_crypto_manager);
dbb->dbb_crypto_manager->terminateCryptThread(tdbb, true);
sync.lock(SYNC_EXCLUSIVE);