summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/timetest.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/timetest.c b/test/timetest.c
index e7751c3..89e372d 100644
--- a/test/timetest.c
+++ b/test/timetest.c
@@ -83,6 +83,7 @@ void* pthread_test(void* args)
if (rt != ETIMEDOUT)
{
printf("pthread_cond_timedwait failed\n");
+ pthread_mutex_unlock(&fakeMutex);
exit(EXIT_FAILURE);
}
pthread_mutex_unlock(&fakeMutex);
@@ -105,6 +106,7 @@ void* pthread_test(void* args)
if (rt != ETIMEDOUT)
{
printf("pthread_cond_timedwait failed\n");
+ pthread_mutex_unlock(&fakeMutex);
exit(EXIT_FAILURE);
}
pthread_mutex_unlock(&fakeMutex);