Browse Source

Bugfix: ztex: Clear device_ztex before freeing it

Luke Dashjr 13 years ago
parent
commit
9bfa5db44d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-ztex.c

+ 1 - 1
driver-ztex.c

@@ -385,11 +385,11 @@ static void ztex_shutdown(struct thr_info *thr)
 	if (!ztex)
 	if (!ztex)
 		return;
 		return;
 	
 	
+	cgpu->device_ztex = NULL;
 	if (ztex->root->numberOfFpgas > 1 && ztex->fpgaNum == 0)
 	if (ztex->root->numberOfFpgas > 1 && ztex->fpgaNum == 0)
 		pthread_mutex_destroy(&ztex->mutex);
 		pthread_mutex_destroy(&ztex->mutex);
 	applog(LOG_DEBUG, "%s: shutdown", ztex->repr);
 	applog(LOG_DEBUG, "%s: shutdown", ztex->repr);
 	libztex_destroy_device(ztex);
 	libztex_destroy_device(ztex);
-	cgpu->device_ztex = NULL;
 }
 }
 
 
 static void ztex_disable(struct thr_info *thr)
 static void ztex_disable(struct thr_info *thr)