Commit bdffffb4f26dad360ff4b6730740905ce4472124

Con Kolivas 2014-05-02T13:38:38

Fix memory leak in submit_noffset_nonce

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index 21d40bd..6769f92 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7173,7 +7173,6 @@ bool submit_noffset_nonce(struct thr_info *thr, struct work *work_in, uint32_t n
 		inc_hw_errors(thr);
 		goto out;
 	}
-	ret = true;
 	update_work_stats(thr, work);
 
 	if (opt_benchfile && opt_benchfile_display)
@@ -7184,6 +7183,7 @@ bool submit_noffset_nonce(struct thr_info *thr, struct work *work_in, uint32_t n
 		       thr->cgpu->device_id);
 		goto  out;
 	}
+	ret = true;
 	submit_work_async(work);
 
 out: