ucb/source/core/ucbstore.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 87519013cb9ed1eae27f799a1a35c8a3cd0e3dd7
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Oct 2 19:23:16 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Oct 3 10:39:50 2024 +0200

    cid#1606693 Data race condition
    
    Change-Id: I107174d36f2bfa0cdcb7017838b1b4404179fb0c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174407
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 7190906b8147..6cc7ee759ab8 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -170,12 +170,9 @@ UcbStore::createPropertySetRegistry( const OUString& )
     // The URL parameter is ignored by this interface implementation. It always
     // uses the configuration server as storage medium.
 
+    std::unique_lock aGuard( m_aMutex );
     if ( !m_xTheRegistry.is() )
-    {
-        std::unique_lock aGuard( m_aMutex );
-        if ( !m_xTheRegistry.is() )
-            m_xTheRegistry = new PropertySetRegistry( m_xContext, m_aInitArgs 
);
-    }
+        m_xTheRegistry = new PropertySetRegistry( m_xContext, m_aInitArgs );
 
     return m_xTheRegistry;
 }

Reply via email to