summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/gss-threads/gss-client.c3
-rw-r--r--src/tests/gss-threads/gss-server.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/gss-threads/gss-client.c b/src/tests/gss-threads/gss-client.c
index f199dc252..25c9d63ee 100644
--- a/src/tests/gss-threads/gss-client.c
+++ b/src/tests/gss-threads/gss-client.c
@@ -20,7 +20,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
- * Copyright (C) 2003, 2004 by the Massachusetts Institute of Technology.
+ * Copyright (C) 2003, 2004, 2008 by the Massachusetts Institute of Technology.
* All rights reserved.
*
* Export of this software from the United States of America may
@@ -703,6 +703,7 @@ WaitAndIncrementThreadCounter(void)
if (counter == max_threads) {
err = pthread_cond_wait(&counter_cond, &counter_mutex);
if (err) {
+ pthread_mutex_unlock(&counter_mutex);
perror("pthread_cond_wait");
return 0;
}
diff --git a/src/tests/gss-threads/gss-server.c b/src/tests/gss-threads/gss-server.c
index 009c4f086..bc22f83e5 100644
--- a/src/tests/gss-threads/gss-server.c
+++ b/src/tests/gss-threads/gss-server.c
@@ -20,7 +20,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
- * Copyright (C) 2004 by the Massachusetts Institute of Technology.
+ * Copyright (C) 2004,2008 by the Massachusetts Institute of Technology.
* All rights reserved.
*
* Export of this software from the United States of America may
@@ -637,6 +637,7 @@ WaitAndIncrementThreadCounter(void)
if (counter == max_threads) {
err = pthread_cond_wait(&counter_cond, &counter_mutex);
if (err) {
+ pthread_mutex_unlock(&counter_mutex);
perror("pthread_cond_wait");
return 0;
}