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

Fixed AV when engine shutdown started during isc_attach_database call execution

This commit is contained in:
hvlad 2009-03-13 09:55:07 +00:00
parent edd4984ffd
commit 0c1e3269b2

View File

@ -5991,6 +5991,15 @@ static ISC_STATUS unwindAttach(const Exception& ex,
{
ex.stuff_exception(userStatus);
if (engineShuttingDown)
{
// this attachment will be released as part of engine shutdown process
// see also cancel_attachments
if (attachment)
attachment->att_mutex.leave();
}
else
{
try
{
ThreadStatusGuard temp_status(tdbb);
@ -6014,6 +6023,7 @@ static ISC_STATUS unwindAttach(const Exception& ex,
{
// no-op
}
}
return userStatus[1];
}