From 877b056bf2451bc1fb7354151417d8fc538f7516 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 21 Aug 2015 11:16:23 +0000 Subject: [PATCH] Postfix for CORE-4908 - need to hold dbInitMutex up to the execution of ~InitHolder --- src/jrd/svc.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index fcc89ff8d6..31826974ec 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -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")) {