From 06ec47b3bd5f49815fb821b8c14fe1d05d6bf683 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Mon, 2 Jul 2012 12:45:16 +1000 Subject: [PATCH] Must always unlock mutex after cond timedwait. --- cgminer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index 753d5a39..3c1a3e9a 100644 --- a/cgminer.c +++ b/cgminer.c @@ -2494,8 +2494,7 @@ int restart_wait(struct timeval *tdiff) abstime.tv_nsec = then.tv_usec * 1000; mutex_lock(&restart_lock); rc = pthread_cond_timedwait(&restart_cond, &restart_lock, &abstime); - if (!rc) - mutex_unlock(&restart_lock); + mutex_unlock(&restart_lock); return rc; }