From 0847d458672dd2c3afda4fe1e8523e5ae1efad09 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 16 Feb 2013 06:46:00 +0000 Subject: [PATCH] Bugfix: Duplicate stratum sessionid when copying work, to avoid double-free --- cgminer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cgminer.c b/cgminer.c index 47496dfc..7c5364a7 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); }