Commit b535bc08267aef90511afff23cb9ec48c4a6a704

Con Kolivas 2014-01-26T22:23:31

Set info work to null after it is freed in nf1 after a restart to prevent double free later.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 202c8af..9968a61 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -911,6 +911,7 @@ static int64_t nf1_scan(struct thr_info *thr, struct cgpu_info *bitfury,
 		info->work = get_work(thr, thr->id);
 		if (unlikely(thr->work_restart)) {
 			free_work(info->work);
+			info->work = NULL;
 			return 0;
 		}
 		bitfury_work_to_payload(&info->payload, info->work);