Browse Source

Merge commit '8534c62' into bfgminer-2.10.x

Luke Dashjr 13 years ago
parent
commit
a792a603e7
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-bitforce.c

+ 2 - 0
driver-bitforce.c

@@ -208,6 +208,7 @@ void bitforce_init(struct cgpu_info *bitforce)
 
 		if (unlikely(!pdevbuf[0])) {
 			mutex_unlock(&bitforce->device_mutex);
+			BFclose(fdDev);
 			applog(LOG_ERR, "BFL%i: Error reading/timeout (ZGX)", bitforce->device_id);
 			return;
 		}
@@ -218,6 +219,7 @@ void bitforce_init(struct cgpu_info *bitforce)
 
 	if (unlikely(!strstr(pdevbuf, "SHA256"))) {
 		mutex_unlock(&bitforce->device_mutex);
+		BFclose(fdDev);
 		applog(LOG_ERR, "BFL%i: Didn't recognise BitForce on %s returned: %s", bitforce->device_id, devpath, pdevbuf);
 		return;
 	}