The MXUser RW lock release code has a bug in it... it asserts on
an unexpected reference count. The bug was caused by not decrementing
the reference count before the assertion.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
MXUserReleaseTracking(&lock->header);
+ Atomic_Dec(&lock->holderCount);
+
if (LIKELY(lock->useNative)) {
int err = MXUserNativeRWRelease(&lock->nativeLock, myContext->state);
}
myContext->state = RW_UNLOCKED;
- Atomic_Dec(&lock->holderCount);
}
/*