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,8 +117,11 @@ rwlock_unlock(rwlock_t *lock)
LeaveCriticalSection(&lock->lk);
return false;
}
lock->readers--;
return true;
if (lock->readers) {
lock->readers--;
return true;
}
return false;
}
#elif defined(__unix__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment