From 4ba0b0169af78c14ed7d70987146dfe240aec572 Mon Sep 17 00:00:00 2001 From: pourfar <48383524+pourfar@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:14:08 +0330 Subject: [PATCH] GUACAMOLE-1940: Correct flag comparison in "guac_rwlock_acquire_write_lock" function --- src/libguac/rwlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libguac/rwlock.c b/src/libguac/rwlock.c index 22d041b2d..1ed717664 100644 --- a/src/libguac/rwlock.c +++ b/src/libguac/rwlock.c @@ -179,7 +179,7 @@ int guac_rwlock_acquire_write_lock(guac_rwlock* reentrant_rwlock) { * write lock by another function without the caller knowing about it. This * shouldn't cause any issues, however. */ - if (key_value == GUAC_REENTRANT_LOCK_READ_LOCK) + if (flag == GUAC_REENTRANT_LOCK_READ_LOCK) pthread_rwlock_unlock(&(reentrant_rwlock->lock)); /* Acquire the write lock */