Browse Source

bifury: Free work when we know it's complete

Luke Dashjr 12 years ago
parent
commit
0c630e9bb2
1 changed files with 7 additions and 0 deletions
  1. 7 0
      driver-bifury.c

+ 7 - 0
driver-bifury.c

@@ -326,6 +326,13 @@ void bifury_handle_cmd(struct cgpu_info * const dev, const char * const cmd)
 		const struct cgpu_info * const proc = device_proc_by_id(dev, chip);
 		thr = proc->thr[0];
 		hashes_done2(thr, 0xbd000000, NULL);
+		
+		HASH_FIND(hh, master_thr->work_list, &jobid, sizeof(jobid), work);
+		if (work)
+		{
+			HASH_DEL(master_thr->work_list, work);
+			free_work(work);
+		}
 	}
 	else
 	if (!strncmp(cmd, "needwork ", 9))