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

Postfix for CORE-4908 - need to hold dbInitMutex up to the execution of ~InitHolder

This commit is contained in:
alexpeshkoff 2015-08-21 11:16:23 +00:00
parent dc3ddc4866
commit 877b056bf2

View File

@ -808,16 +808,11 @@ Service::Service(const TEXT* service_name, USHORT spb_length, const UCHAR* spb_d
#ifdef REEXPAND_DBNAME
// Needed to ensure correct locking order with security database mutex
MutexEnsureUnlock dbInitGuard(JRD_get_dbinitmutex());
dbInitGuard.enter();
MutexLockGuard dbInitGuard(JRD_get_dbinitmutex());
#endif
SecurityDatabase::InitHolder siHolder;
#ifdef REEXPAND_DBNAME
dbInitGuard.leave();
#endif
// Perhaps checkout the user in the security database.
USHORT user_flag;
if (!strcmp(serv->serv_name, "anonymous")) {