speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] espeak_state_mutex sometimes is not unlocked in module espea


From: José Vilmar Estácio de Souza
Subject: [PATCH 2/2] espeak_state_mutex sometimes is not unlocked in module espeak
Date: Mon, 1 Nov 2010 16:23:42 -0200

There is a case in which the  function  module_speak returns without call
the pthread_mutex_unlock to the espeak_state_mutex variable.
---
 src/modules/espeak.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/espeak.c b/src/modules/espeak.c
index ac5f374..cd810c4 100644
--- a/src/modules/espeak.c
+++ b/src/modules/espeak.c
@@ -417,12 +417,12 @@ module_speak(gchar *data, size_t bytes, EMessageType 
msgtype)
                break;
        }
 
+       pthread_mutex_unlock(&espeak_state_mutex);    
+
        if (result != EE_OK) {
                return FALSE;
        }
 
-       pthread_mutex_unlock(&espeak_state_mutex);    
-
        DBG("Espeak: Leaving module_speak() normally.");
        return bytes;
 }
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]