diff --git a/src/CvSourceImpl.cpp b/src/CvSourceImpl.cpp index 8fcbb3f4b7..1523ae8b5d 100644 --- a/src/CvSourceImpl.cpp +++ b/src/CvSourceImpl.cpp @@ -113,7 +113,7 @@ void CvSourceImpl::NotifyError(llvm::StringRef msg) { int CvSourceImpl::CreateProperty(llvm::StringRef name, CS_PropertyKind kind, int minimum, int maximum, int step, int defaultValue, int value) { - std::unique_lock lock(m_mutex); + std::lock_guard lock(m_mutex); int& ndx = m_properties[name]; if (ndx == 0) { // create a new index