summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2011-08-04 14:00:44 +0300
committerAlon Levy <alevy@redhat.com>2011-08-23 17:01:14 +0300
commit06c2e22fd901110db88ed3bbd75703b32e810036 (patch)
treef319a21ff7da448c97487f85e5263611a9269809 /server
parent5c99a6da4fb2b8d91799cc3eaa86c2e92d55388e (diff)
server/red_worker.c: fix - locking the wrong mutex when releasing glz dict
Diffstat (limited to 'server')
-rw-r--r--server/red_worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index efedc197..7d27d5a1 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8604,13 +8604,13 @@ static void red_release_glz(DisplayChannel *channel)
}
channel->glz_dict = NULL;
- pthread_mutex_lock(&cache_lock);
+ pthread_mutex_lock(&glz_dictionary_list_lock);
if (--shared_dict->refs) {
- pthread_mutex_unlock(&cache_lock);
+ pthread_mutex_unlock(&glz_dictionary_list_lock);
return;
}
ring_remove(&shared_dict->base);
- pthread_mutex_unlock(&cache_lock);
+ pthread_mutex_unlock(&glz_dictionary_list_lock);
glz_enc_dictionary_destroy(shared_dict->dict, &channel->glz_data.usr);
free(shared_dict);
}