Commit 4fdd45af6bae2c9f450135fde3682e11c83112da

Con Kolivas 2013-02-16T03:51:33

Merge pull request #387 from luke-jr/bugfix_20130215b Bugfix: Duplicate stratum sessionid when copying work, to avoid double-free

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 51faefe..78d894c 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2950,6 +2950,8 @@ void __copy_work(struct work *work, struct work *base_work)
 		work->nonce2 = strdup(base_work->nonce2);
 	if (base_work->ntime)
 		work->ntime = strdup(base_work->ntime);
+	if (base_work->sessionid)
+		work->sessionid = strdup(base_work->sessionid);
 	if (base_work->gbt_coinbase)
 		work->gbt_coinbase = strdup(base_work->gbt_coinbase);
 }