Commit 6e6d354757f4280725a880db79f22e1a6d3aff70

Con Kolivas 2014-01-31T22:01:37

Remove the unqueued work reference when we discard work from get queued as well.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cgminer.c b/cgminer.c
index dc40c91..1305a58 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6379,11 +6379,10 @@ struct work *get_queued(struct cgpu_info *cgpu)
 			work = NULL;
 			wake_gws();
 			goto out_unlock;
-		}
-		__add_queued(cgpu, work);
+		} else
+			__add_queued(cgpu, work);
 		cgpu->unqueued_work = NULL;
 	}
-out_unlock:
 	wr_unlock(&cgpu->qlock);
 
 	return work;