From eda41a271ed319560f0ab111cd9566266ab1bb29 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 21 Aug 2017 23:05:09 +0200 Subject: [PATCH] cppuhelper: fix double checked locking in getTypeEntries() Change-Id: I73674f0293a57ed7c4d54aa6b68ff64d5ca4e7bd --- cppuhelper/source/implbase_ex.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index 2b7b792e718a..d01f61983a91 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -105,9 +105,14 @@ static inline type_entry * getTypeEntries( class_data * cd ) // ref is statically held by getCppuType() pEntry->m_type.typeRef = rType.getTypeLibType(); } + OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); cd->m_storedTypeRefs = true; } } + else + { + OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); + } return pEntries; }