From a6f6a337b17626fb169fcb84a41b4bd47566dd22 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Wed, 20 Jan 2016 22:55:20 +0000 Subject: [PATCH] Add a missing pthread_mutex_unlock call in fifo_add_commands. [Coverity] --- src/libespeak-ng/fifo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libespeak-ng/fifo.c b/src/libespeak-ng/fifo.c index 61de382d..2e60cd39 100644 --- a/src/libespeak-ng/fifo.c +++ b/src/libespeak-ng/fifo.c @@ -123,8 +123,10 @@ espeak_ng_STATUS fifo_add_commands(t_espeak_command *command1, t_espeak_command if ((status = pthread_mutex_lock(&my_mutex)) != ENS_OK) return status; - if (node_counter+1 >= MAX_NODE_COUNTER) + if (node_counter+1 >= MAX_NODE_COUNTER) { + pthread_mutex_unlock(&my_mutex); return ENS_FIFO_BUFFER_FULL; + } if ((status = push(command1)) != ENS_OK) { pthread_mutex_unlock(&my_mutex);