summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-08-21 23:05:09 +0200
committerMichael Stahl <mstahl@redhat.com>2017-08-21 23:31:26 +0200
commiteda41a271ed319560f0ab111cd9566266ab1bb29 (patch)
tree431f1ff3248b62e019d79d8b3083fbef3775c91c /cppuhelper
parent20a7ffd848ee9d9007ae1c9464713f9d1d125bce (diff)
cppuhelper: fix double checked locking in getTypeEntries()
Change-Id: I73674f0293a57ed7c4d54aa6b68ff64d5ca4e7bd
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/implbase_ex.cxx5
1 files changed, 5 insertions, 0 deletions
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;
}