mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
atomic.cpp: add minor safety check
This commit is contained in:
parent
3e445eff8e
commit
31f0a0c064
@ -1198,7 +1198,12 @@ atomic_wait_engine::notify_all(const void* data, u32 size, __m128i mask, __m128i
|
||||
// Cleanup locked notifiers
|
||||
for (u64 bits = lock; bits; bits &= bits - 1)
|
||||
{
|
||||
cond_free(lock_ids[std::countr_zero(bits)]);
|
||||
const u32 id = std::countr_zero(bits);
|
||||
|
||||
if (u32 cond_id = lock_ids[id])
|
||||
{
|
||||
cond_free(cond_id);
|
||||
}
|
||||
}
|
||||
|
||||
s_tls_notify_cb(data, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user