Skip to content
Snippets Groups Projects
Commit c9189314 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Half-assed error handling for unbalanced lock/unlock

parent 89187b83
No related branches found
No related tags found
No related merge requests found
Pipeline #5285 failed
...@@ -117,9 +117,12 @@ rwlock_unlock(rwlock_t *lock) ...@@ -117,9 +117,12 @@ rwlock_unlock(rwlock_t *lock)
LeaveCriticalSection(&lock->lk); LeaveCriticalSection(&lock->lk);
return false; return false;
} }
if (lock->readers) {
lock->readers--; lock->readers--;
return true; return true;
} }
return false;
}
#elif defined(__unix__) #elif defined(__unix__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment