Skip to content

Commit e150934

Browse files
committed
Coverity: Fix 1595225 Data race condition
1 parent d51935e commit e150934

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/loader/layers/validation/ur_leak_check.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ struct RefCountContext {
136136
void clear() { counts.clear(); }
137137

138138
template <typename T> bool isReferenceValid(T handle) {
139+
std::unique_lock<std::mutex> lock(mutex);
139140
auto it = counts.find(static_cast<void *>(handle));
140141
if (it == counts.end() || it->second.refCount < 1) {
141142
return false;

0 commit comments

Comments
 (0)