From e13c580caceeb844e9f0a21dc0d02e4fa218e3ad Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 3 Jul 2013 20:56:56 +1000 Subject: [PATCH] Fix potential dereference when starting avalon with all new work. --- driver-avalon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-avalon.c b/driver-avalon.c index 398920d3..92ccf0e0 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,