From 06c2e22fd901110db88ed3bbd75703b32e810036 Mon Sep 17 00:00:00 2001 From: Yonit Halperin Date: Thu, 4 Aug 2011 14:00:44 +0300 Subject: [PATCH] server/red_worker.c: fix - locking the wrong mutex when releasing glz dict --- server/red_worker.c | 6 +++--- 1 file 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); }