Browse Source

Bugfix: Clear work before replacing it with new, to free any pointers

Luke Dashjr 13 years ago
parent
commit
78e7924e2f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      miner.c

+ 2 - 0
miner.c

@@ -4769,6 +4769,8 @@ keepwaiting:
 			pool_resus(pool);
 	}
 
+	clear_work(work);
+	// NOTE: Since we are moving the references (if any), use free instead of free_work here
 	memcpy(work, work_heap, sizeof(struct work));
 	free(work_heap);