Commit e13c580caceeb844e9f0a21dc0d02e4fa218e3ad

Con Kolivas 2013-07-03T20:56:56

Fix potential dereference when starting avalon with all new work.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-avalon.c b/driver-avalon.c
index 398920d..92ccf0e 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -940,7 +940,7 @@ static void *avalon_send_tasks(void *userdata)
 				break;
 			}
 
-			if (likely(j < avalon->queued && !info->overheat)) {
+			if (likely(j < avalon->queued && !info->overheat && avalon->works[i])) {
 				info->idle = false;
 				avalon_init_task(&at, 0, 0, info->fan_pwm,
 						info->timeout, info->asic_count,