Commit 651f3185e9dacddd8beb18f0a6ea69a414dc676c

kanoi 2014-05-09T21:49:50

minion - check rolled in stale work cleanup

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/driver-minion.c b/driver-minion.c
index 1cdc3f4..32ec4bf 100644
--- a/driver-minion.c
+++ b/driver-minion.c
@@ -2336,7 +2336,10 @@ static void minion_flush_work(struct cgpu_info *minioncgpu)
 		// mark complete all stale unused work (oldest first)
 		prev_unused = stale_unused_work;
 		while (prev_unused) {
-			work_completed(minioncgpu, DATAW(prev_unused)->work);
+			if (DATAW(prev_unused)->rolled)
+				free_work(DATAW(prev_unused)->work);
+			else
+				work_completed(minioncgpu, DATAW(prev_unused)->work);
 			prev_unused = prev_unused->prev;
 		}